Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
james58899 committed Mar 8, 2024
1 parent c516e40 commit bb3a2ea
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main" ]
workflow_call:

env:
CARGO_TERM_COLOR: always
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
push:
branches: [ "main" ]
tags: [ "**" ]

jobs:
Build:
uses: ./.github/workflows/build.yml
Release:
needs: Build
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Rename artifact
run: |
mv artifacts/hath-rust-x86_64-unknown-linux-gnu/hath-rust hath-rust-x86_64-unknown-linux-gnu
mv artifacts/hath-rust-aarch64-unknown-linux-gnu/hath-rust hath-rust-aarch64-unknown-linux-gnu
mv artifacts/hath-rust-armv7-unknown-linux-gnueabihf/hath-rust hath-rust-armv7-unknown-linux-gnueabihf
mv artifacts/hath-rust-x86_64-pc-windows-msvc/hath-rust.exe hath-rust-x86_64-pc-windows-msvc.exe
mv artifacts/hath-rust-i686-pc-windows-msvc/hath-rust.exe hath-rust-i686-pc-windows-msvc.exe
mv artifacts/hath-rust-universal-apple-darwin/hath-rust hath-rust-universal-apple-darwin
- name: Create release
uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true
files: |
hath-rust-x86_64-unknown-linux-gnu
hath-rust-aarch64-unknown-linux-gnu
hath-rust-armv7-unknown-linux-gnueabihf
hath-rust-x86_64-pc-windows-msvc.exe
hath-rust-i686-pc-windows-msvc.exe
hath-rust-universal-apple-darwin

0 comments on commit bb3a2ea

Please sign in to comment.