Skip to content

Release

Release #5

Workflow file for this run

name: Release
on:
push:
tags: [ "v*" ]
workflow_dispatch: {}
defaults:
run:
shell: bash
jobs:
release:
permissions:
contents: write
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
name: Release ${{ matrix.target }}
steps:
- uses: actions/checkout@v3
- name: Determine release type
id: release-type
run: |
if [[ ${{ github.ref }} =~ ^refs/tags/[0-9]+[.][0-9]+[.][0-9]+$ ]]; then
echo 'type=release' >> "$GITHUB_OUTPUT"
else
echo 'type=prerelease' >> "$GITHUB_OUTPUT"
fi
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-release-cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: ${{ runner.os }}-release-cargo
- name: Build CLI app
run: |
cargo build -p term-transcript-cli \
--profile=executable \
--target=${{ matrix.target }} \
--all-features \
--locked
- name: Package archive
id: package
run: ./cli/package.sh ${REF#"refs/tags/"}
env:
OS: ${{ matrix.os }}
TARGET: ${{ matrix.target }}
REF: ${{ github.ref }}
- name: Publish archive
uses: softprops/action-gh-release@v1
if: github.event_name == "push"

Check failure on line 72 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 72, Col: 13): Unexpected symbol: '"push"'. Located at position 22 within expression: github.event_name == "push" .github/workflows/release.yml (Line: 79, Col: 13): Unexpected symbol: '"workflow_dispatch"'. Located at position 22 within expression: github.event_name == "workflow_dispatch"
with:
draft: false
files: ${{ steps.package.outputs.archive }}
prerelease: ${{ steps.release-type.outputs.type == 'prerelease' }}
- name: Attach archive to action
uses: actions/upload-artifact@v3
if: github.event_name == "workflow_dispatch"
with:
name: term-transcript-${{ matrix.target }}
path: ${{ steps.package.outputs.archive }}