Skip to content

Commit

Permalink
Add release action.
Browse files Browse the repository at this point in the history
  • Loading branch information
ibz committed Jun 11, 2024
1 parent a03570b commit 0e5aaf4
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 28 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on:
push:
branches: [ "master" ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compile
id: compile
uses: rust-build/rust-build.action@v1.4.5
with:
RUSTTARGET: x86_64-unknown-linux-musl
TOOLCHAIN_VERSION: 1.78.0
UPLOAD_MODE: none
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Binary
path: |
${{ steps.compile.outputs.BUILT_ARCHIVE }}
${{ steps.compile.outputs.BUILT_CHECKSUM }}
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
release:
types: [created]

env:
CARGO_TERM_COLOR: always

jobs:
release:
permissions: write-all
name: release ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
archive: zip
- target: x86_64-unknown-linux-musl
archive: tar.gz
- target: x86_64-apple-darwin
archive: zip
steps:
- uses: actions/checkout@v4
- uses: EndBug/latest-tag@latest
with:
force-branch: true
- uses: rust-build/rust-build.action@v1.4.5
name: Compile and release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}
28 changes: 0 additions & 28 deletions .github/workflows/rust.yml

This file was deleted.

0 comments on commit 0e5aaf4

Please sign in to comment.