Skip to content

Commit

Permalink
ci(actions): Combine test builds and release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Sep 16, 2024
1 parent de34208 commit 21f575e
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 45 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build

on: [ push, pull_request ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

build-ubuntu:
strategy:
fail-fast: false
runs-on: ubuntu-22.04
name: Build Ubuntu
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install clang libarchive-tools mold
- name: Setup ‘cargo’
uses: actions-rs/toolchain@v1
- name: Configure
run: |
./bootstrap.sh
./configure \
--enable-developer-mode \
--disable-dependency-checks \
CHECKMAKE=false RUFF=false TYPOS=cat
echo "VERSION=$(./build-aux/git-version-gen .tarball-version)" >> $GITHUB_ENV
echo "MAKEFLAGS=-j$(nproc) -Otarget" >> $GITHUB_ENV
- name: Make
run: |
make
- name: Package
run: |
make dist
- name: Upload source dist artifact
if: ${{ ! startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v4
with:
name: fontship-${{ env.VERSION }}
path: fontship-${{ env.VERSION }}.zip
- name: Release
uses: softprops/action-gh-release@v2
if: github.repository == 'theleagueof/fontship' && startsWith(github.ref, 'refs/tags/v')
with:
body_path: fontship-${{ env.VERSION }}.md
files: |
fontship-${{ env.VERSION }}.zip
fontship-${{ env.VERSION }}.tar.zst
fontship-${{ env.VERSION }}.sha256.txt
9 changes: 3 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,17 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
run: |
git fetch --prune --tags ||:
- name: Setup system dependencies
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install clang mold
- name: Configure
run: |
./bootstrap.sh
./configure \
--without-{bash,fish,zsh}-completion-dir \
--enable-developer-mode \
--disable-dependency-checks \
CURL=curl DOCKER=docker DIFF=diff TR=tr SORT=sort
CHECKMAKE=false RUFF=false TYPOS=false
- name: Publish Docker Image to GH Container Registry
run: |
make docker-build-push
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit 21f575e

Please sign in to comment.