Skip to content

Commit

Permalink
chore(release): im only fluent in gitlab actions 💀
Browse files Browse the repository at this point in the history
  • Loading branch information
timothebot committed Jul 25, 2024
1 parent 842d514 commit afc753c
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release

on:
push:
branches: [ "main" ]

jobs:
release:
name: release ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- os: macos-11
target: x86_64-apple-darwin
- os: macos-11
target: aarch64-apple-darwin
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version
id: get_version
uses: SebRollen/[email protected]
with:
file: Cargo.toml
field: package.version
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Setup cache
uses: Swatinem/[email protected]
with:
key: ${{ matrix.target }}
- name: Build binary
uses: actions-rs/cargo@v1
with:
command: build
args: --release --locked --target=${{ matrix.target }} --color=always --verbose
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: |
*.deb
*.tar.gz
*.zip
- name: Create release
if: startsWith(github.event.head_commit.message, 'chore(release)')
uses: softprops/action-gh-release@v2
with:
draft: true
files: |
*.deb
*.tar.gz
*.zip
name: ${{ steps.get_version.outputs.value }}
tag_name: ""
generate_release_notes: true

0 comments on commit afc753c

Please sign in to comment.