Split release and publish

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

@ -62,7 +62,8 @@ jobs:
key: ubuntu-latest key: ubuntu-latest
- run: cargo test - run: cargo test
publish: # Release xremap binaries on GitHub
release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:
- build - build
@ -75,9 +76,6 @@ jobs:
profile: minimal profile: minimal
toolchain: stable toolchain: stable
override: true override: true
- uses: Swatinem/rust-cache@v1
with:
key: ubuntu-latest
# Fetch x86_64 binary # Fetch x86_64 binary
- { uses: actions/download-artifact@v3, with: { name: xremap-x86_64-x11, path: package/ } } - { uses: actions/download-artifact@v3, with: { name: xremap-x86_64-x11, path: package/ } }
@ -105,6 +103,24 @@ jobs:
GHR_VERSION: v0.16.2 GHR_VERSION: v0.16.2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 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 # Release crate
- name: cargo login - name: cargo login
run: cargo login "$CARGO_TOKEN" run: cargo login "$CARGO_TOKEN"

Loading…
Cancel
Save