chore: bump version 0.19.1 → 0.19.2 [skip-ci] #96
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- 'v[0-9]+.*' | |
name: Release | |
jobs: | |
create_release: | |
name: Create release | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: true # todo: change to false | |
prerelease: true | |
crates: | |
name: Publish schematools on crates.io | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- run: cargo publish -p schematools --token ${CRATES_TOKEN} | |
env: | |
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} | |
- run: cargo publish -p schematools-cli --token ${CRATES_TOKEN} | |
env: | |
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} | |
release_assets: | |
name: Release assets | |
needs: create_release | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
matrix: | |
config: | |
- os: ubuntu-22.04 | |
target: x86_64-unknown-linux-gnu | |
short: linux-amd64 | |
- os: macos-13 | |
target: x86_64-apple-darwin | |
short: darwin-amd64 | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
short: windows-amd64 | |
extension: .exe | |
- os: macos-14 | |
target: aarch64-apple-darwin | |
short: darwin-arm64 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: ${{ matrix.config.target }} | |
default: true | |
override: true | |
- run: cargo build --release | |
- run: strip target/release/schematools-cli${{ matrix.config.extension }} | |
- run: mv target/release/schematools-cli${{ matrix.config.extension }} target/release/schematools-${{ matrix.config.short }}${{ matrix.config.extension }} | |
- run: tar -czf target/release/schematools-${{ matrix.config.short }}.tar.gz -C ./target/release schematools-${{ matrix.config.short }}${{ matrix.config.extension }} | |
# upload files | |
- name: Upload release assets | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_name: schematools-${{ matrix.config.short }}.tar.gz | |
asset_path: ./target/release/schematools-${{ matrix.config.short }}.tar.gz | |
asset_content_type: application/tar+gzip |