From c098b180e70da98829a1b0447ea7eb9f69a5ed2f Mon Sep 17 00:00:00 2001 From: Julius Liu Date: Thu, 2 Feb 2023 17:43:19 -0800 Subject: [PATCH] Fix github-actions (#5) * feat. release 1804/2004 ubuntu packages * feat. fix job ids --- .github/workflows/rust-tag-release.yml | 37 +++++++++++++++++++++----- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust-tag-release.yml b/.github/workflows/rust-tag-release.yml index a2d5199..c59cb7d 100644 --- a/.github/workflows/rust-tag-release.yml +++ b/.github/workflows/rust-tag-release.yml @@ -9,8 +9,25 @@ env: CARGO_TERM_COLOR: always jobs: - build: - name: Build + build_1804: + name: Build Ubuntu-18.04 + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v3 + - name: Run tests + run: cargo test --verbose + - name: Install tools + run: cargo install cargo-deb + - name: Package + run: | + cargo deb --output "target/debian/acr-mirror-1804-$GITHUB_REF_NAME-${GITHUB_SHA::5}.deb" + - name: Publish artifacts + uses: actions/upload-artifact@master + with: + name: acr-mirror-deb-18.04 + path: target/debian/*.deb + build_2004: + name: Build Ubuntu-20.04 runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -19,22 +36,28 @@ jobs: - name: Install tools run: cargo install cargo-deb - name: Package - run: cargo deb + run: | + cargo deb --output "target/debian/acr-mirror-2004-$GITHUB_REF_NAME-${GITHUB_SHA::5}.deb" - name: Publish artifacts uses: actions/upload-artifact@master with: - name: acr-mirror-deb + name: acr-mirror-deb-20.04 path: target/debian/*.deb release: name: Release runs-on: ubuntu-latest - needs: build + needs: [ "build_1804", "build_2004" ] if: startsWith(github.ref, 'refs/tags/v') steps: - - name: Download Artifacts + - name: Download Artifacts 18.04 + uses: actions/download-artifact@master + with: + name: acr-mirror-deb-18.04 + path: build/ + - name: Download Artifacts 20.04 uses: actions/download-artifact@master with: - name: acr-mirror-deb + name: acr-mirror-deb-20.04 path: build/ - name: Release uses: fnkr/github-action-ghr@v1