Skip to content

Commit

Permalink
Create separate release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
owenthewizard committed May 27, 2024
1 parent 648cb32 commit 4c6cecc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 19 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Release

on:
push:

env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
rust-build:
if: startsWith(github.ref, 'refs/tags/')
name: Rust Build
runs-on: ubuntu-latest
steps:
- name: Install XCB
run: sudo apt install -y libxcb1-dev libxcb-randr0-dev libxcb-shm0-dev
- uses: actions/checkout@v4
- name: Enable Caching
uses: Swatinem/rust-cache@v2
- name: Cargo Build
run: cargo build --release
- name: Configure GPG Key
run: echo -n "$GPG_SIGNING_KEY" | gpg --batch --pinentry-mode loopback --allow-secret-key-import --import
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
- name: Sign Release
run: gpg --batch --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" --detach-sign "$GITHUB_WORKSPACE/target/release/i3lockr"
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Draft Release
uses: softprops/action-gh-release@v2
with:
files: |
$GITHUB_WORKSPACE/target/release/i3lockr
$GITHUB_WORKSPACE/target/release/i3lockr.sig
21 changes: 2 additions & 19 deletions .github/workflows/rust_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
fail-fast: false
matrix:
action:
- command: build
args: --color always
- command: fmt
args: --all -- --check --color always
- command: clippy
Expand All @@ -33,22 +35,3 @@ jobs:
uses: Swatinem/rust-cache@v2
- name: Run Command
run: cargo ${{ matrix.action.command }} ${{ matrix.action.args }}
rust-build:
name: Rust Build
runs-on: ubuntu-latest
steps:
- name: Install XCB
run: sudo apt install -y libxcb1-dev libxcb-randr0-dev libxcb-shm0-dev
- uses: actions/checkout@v4
- name: Enable Caching
uses: Swatinem/rust-cache@v2
- name: Cargo Build
run: cargo build --release
- name: Configure GPG Key
run: echo -n "$GPG_SIGNING_KEY" | gpg --batch --pinentry-mode loopback --allow-secret-key-import --import
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
- name: Sign Release
run: gpg --batch --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" --detach-sign "$GITHUB_WORKSPACE/target/release/i3lockr"
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

0 comments on commit 4c6cecc

Please sign in to comment.