Skip to content

Commit

Permalink
Fix github-actions (#5)
Browse files Browse the repository at this point in the history
* feat. release 1804/2004 ubuntu packages

* feat. fix job ids
  • Loading branch information
juliusl authored Feb 3, 2023
1 parent 1c74824 commit c098b18
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions .github/workflows/rust-tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c098b18

Please sign in to comment.