Skip to content

Commit

Permalink
test release to multiple platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxfight committed May 16, 2024
1 parent c3cf4fc commit eae8021
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,19 @@ jobs:
permissions:
contents: write
packages: write
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Shorten Commit SHA
id: shorten_sha
run: echo "::set-output name=short_sha::${GITHUB_SHA:0:7}"
run: echo "SHORT_SHA=${GITHUB_SHA:0:7}" >> "$GITHUB_OUTPUT"

- name: Set up rust
uses: actions-rust-lang/setup-rust-toolchain@v1
Expand All @@ -28,7 +33,7 @@ jobs:
run: cargo build --release

- name: Package
run: tar -czvf release.tar.gz -C target/release .
run: tar -czvf release-${{ matrix.platform }}.tar.gz -C target/release .

- name: Publish Release
id: publish_release
Expand All @@ -37,8 +42,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
release.tar.gz
release-${{ matrix.platform }}.tar.gz
tag_name: ${{ steps.shorten_sha.outputs.short_sha }}
release_name: Release ${{ steps.shorten_sha.outputs.short_sha }}
release_name: Release ${{ steps.shorten_sha.outputs.SHORT_SHA }}
body: |
Release for commit ${{ steps.shorten_sha.outputs.short_sha }}
Release for commit ${{ steps.shorten_sha.outputs.SHORT_SHA }}

0 comments on commit eae8021

Please sign in to comment.