Skip to content

chore(main): release 0.1.1 (#6) #19

chore(main): release 0.1.1 (#6)

chore(main): release 0.1.1 (#6) #19

Workflow file for this run

name: Release
on:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}
patch: ${{ steps.release.outputs.patch }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: rust
upload:
name: Build and upload ${{ matrix.platform.target }}
runs-on: ${{ matrix.platform.os }}
needs: release-please
if: ${{ needs.release-please.outputs.releases_created == 'true' }}
env:
TAG_NAME: ${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }}.${{ needs.release-please.outputs.patch }}
strategy:
matrix:
platform:
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-latest-large
target: x86_64-apple-darwin
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rustup target
run: rustup target add ${{ matrix.platform.target }}
- name: Cargo build
run: cargo build --release --target ${{ matrix.platform.target }}
- name: Create tar and upload artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd target/${{ matrix.platform.target }}/release
tar -czf tsc-cli-${{ env.TAG_NAME }}-${{ matrix.platform.target }}.tar.gz tsc-cli
gh release upload --clobber ${{ needs.release-please.outputs.tag_name }} tsc-cli-${{ env.TAG_NAME }}-${{ matrix.platform.target }}.tar.gz