Split release and publish

pull/449/head
Takashi Kokubun 1 month ago
parent 429133067e
commit 2f22c52b12

@ -62,7 +62,8 @@ jobs:
key: ubuntu-latest
- run: cargo test
publish:
# Release xremap binaries on GitHub
release:
runs-on: ubuntu-latest
needs:
- build
@ -75,9 +76,6 @@ jobs:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
with:
key: ubuntu-latest
# Fetch x86_64 binary
- { uses: actions/download-artifact@v3, with: { name: xremap-x86_64-x11, path: package/ } }
@ -105,6 +103,24 @@ jobs:
GHR_VERSION: v0.16.2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Publish xremap to crates.io
publish:
runs-on: ubuntu-latest
needs:
- build
- test
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
with:
key: ubuntu-latest
# Release crate
- name: cargo login
run: cargo login "$CARGO_TOKEN"

Loading…
Cancel
Save