Skip to content

Commit

Permalink
feat(ci): release workflow
Browse files Browse the repository at this point in the history
rushiiMachine committed Jan 1, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent aaf1cc0 commit b47b489
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Release

concurrency:
group: "release"
cancel-in-progress: true

on:
push:
tags:
- "v*.*.*"

jobs:
build:
name: Build & Publish
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup toolchain
run: |
rustup toolchain add --profile=minimal stable
rustup target add x86_64-pc-windows-msvc
rustup target add i686-pc-windows-msvc
- name: Build
run: |
cargo build --target=x86_64-pc-windows-msvc --release
cargo build --target=i686-pc-windows-msvc --release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: osu-switcher
path: ${{ github.workspace }}/target/**/osu-switcher.exe

- run: |
mv ./target/x86_64-pc-windows-msvc/release/osu-switcher.exe ./osu-switcher-x86_64.exe
mv ./target/i686-pc-windows-msvc/release/osu-switcher.exe ./osu-switcher-x86.exe
- name: Create Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
fail_on_unmatched_files: true
files: |
${{ github.workspace }}/*.exe

0 comments on commit b47b489

Please sign in to comment.