Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
aurexav committed Jul 8, 2024
1 parent e7231d2 commit bdec297
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 55 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
name: Checks
on:
push:
branches:
- main
pull_request:
branches:
- main

env:
CACHE_VERSION: 0
Expand All @@ -17,6 +10,14 @@ env:

RUST_BACKTRACE: full

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
cargo-checks:
name: Task cargo ${{ matrix.action }}
Expand Down
38 changes: 12 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Release

env:
CARGO_TERM_COLOR: always

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build ${{ matrix.target.name }} package
Expand Down Expand Up @@ -34,35 +35,31 @@ jobs:
run: |
mv target/${{ matrix.target.name }}/ci-release/air${{ matrix.target.extension }} .
zstd --ultra -22 -o air-${{ matrix.target.name }}.zst air${{ matrix.target.extension }}
- name: Collect artifact
run: |
mkdir -p artifacts
mv air-${{ matrix.target.name }}.zst artifacts
- name: Upload artifact
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4
with:
name: artifacts
path: artifacts
name: air-${{ matrix.target.name }}
path: air-${{ matrix.target.name }}.zst
retention-days: 1

release:
name: Release
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: artifacts
path: artifacts
uses: actions/download-artifact@v4
- name: Hash
run: |
mkdir -p artifacts
mv air-*/* artifacts/
cd artifacts
sha256sum * | tee ../SHA256
md5sum * | tee ../MD5
mv ../SHA256 .
mv ../MD5 .
- name: Publish
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
discussion_category_name: Announcements
generate_release_notes: true
Expand All @@ -78,14 +75,3 @@ jobs:
run: cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish
run: cargo publish --locked

clean-artifacts:
name: Clean artifacts
if: always()
needs: [release]
steps:
- name: Clean artifacts
uses: geekyeggo/delete-artifact@v2
with:
name: artifacts
runs-on: ubuntu-latest
34 changes: 12 additions & 22 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Staging
on:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

on:
workflow_dispatch:

jobs:
build:
name: Build ${{ matrix.target.name }} package
Expand Down Expand Up @@ -32,35 +33,35 @@ jobs:
run: |
mv target/${{ matrix.target.name }}/ci-release/air${{ matrix.target.extension }} .
zstd --ultra -22 -o air-${{ matrix.target.name }}.zst air${{ matrix.target.extension }}
- name: Collect artifact
run: |
mkdir -p artifacts
mv air-${{ matrix.target.name }}.zst artifacts
- name: Upload artifact
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4
with:
name: artifacts
path: artifacts
name: air-${{ matrix.target.name }}
path: air-${{ matrix.target.name }}.zst
retention-days: 1

staging:
name: Staging
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: artifacts
path: artifacts
- name: Hash
run: |
mkdir -p artifacts
mv air-*/* artifacts/
cd artifacts
sha256sum * | tee ../SHA256
md5sum * | tee ../MD5
mv ../SHA256 .
mv ../MD5 .
ls -al
# - name: Publish
# uses: softprops/action-gh-release@v1
# uses: softprops/action-gh-release@v2
# with:
# discussion_category_name: Announcements
# generate_release_notes: true
Expand All @@ -76,14 +77,3 @@ jobs:
# run: cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
# - name: Publish
# run: cargo publish --locked

clean-artifacts:
name: Clean artifacts
if: always()
needs: [staging]
steps:
- name: Clean artifacts
uses: geekyeggo/delete-artifact@v2
with:
name: artifacts
runs-on: ubuntu-latest

0 comments on commit bdec297

Please sign in to comment.