Skip to content

fix(release): can not use env vars inside with #13

fix(release): can not use env vars inside with

fix(release): can not use env vars inside with #13

Workflow file for this run

name: release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
release:
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
# cross compile to these targets.
# see https://qiita.com/okmt765/items/ad3cdfb5850e68edcef0
# see https://dzfrias.dev/blog/deploy-rust-cross-platform-github-actions
platform:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.platform.target }}
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{ matrix.platform.target }}
- run: mv target/${{ matrix.platform.target }}/release/jsonwith jsonwith-${{ github.ref_name }}-${{ matrix.platform.target }}
- run: |
cat <<'EOF' | envsubst > release.md
# jsonwith ${{ github.ref_name }}
## Installation
```bash
cargo install --git https://github.com/enuesaa/jsonwith --tag ${{ github.ref_name }}
```
EOF
- uses: softprops/action-gh-release@v1
with:
prerelease: true
body_path: release.md
files: jsonwith-${{ github.ref_name }}-${{ matrix.platform.target }}