|
|
|
@ -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,16 +76,6 @@ jobs:
|
|
|
|
|
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"
|
|
|
|
|
env:
|
|
|
|
|
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
|
|
|
|
|
- run: cargo publish
|
|
|
|
|
|
|
|
|
|
# Fetch x86_64 binary
|
|
|
|
|
- { uses: actions/download-artifact@v3, with: { name: xremap-x86_64-x11, path: package/ } }
|
|
|
|
@ -107,7 +98,32 @@ jobs:
|
|
|
|
|
run: |
|
|
|
|
|
export VERSION=$(echo "$GITHUB_REF" | sed -e 's!refs/tags/!!')
|
|
|
|
|
curl -L "https://github.com/tcnksm/ghr/releases/download/${GHR_VERSION}/ghr_${GHR_VERSION}_linux_amd64.tar.gz" | tar xvz
|
|
|
|
|
"ghr_${GHR_VERSION}_linux_amd64/ghr" -u k0kubun -r xremap -replace -n "$VERSION" "$VERSION" package/
|
|
|
|
|
"ghr_${GHR_VERSION}_linux_amd64/ghr" -u xremap -r xremap -replace -n "$VERSION" "$VERSION" package/
|
|
|
|
|
env:
|
|
|
|
|
GHR_VERSION: v0.14.0
|
|
|
|
|
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"
|
|
|
|
|
env:
|
|
|
|
|
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
|
|
|
|
|
- run: cargo publish
|
|
|
|
|