Skip to content

GHA fix syntax error 2. #3

GHA fix syntax error 2.

GHA fix syntax error 2. #3

Workflow file for this run

name: Upload Rust Packages

Check failure on line 1 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: publish
on:
release:
types: [published]
permissions:
contents: write
jobs:
upload-binkplayer:
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [linux, windows, mac]
include:
- build: linux
os: ubuntu-latest
exec: binkplayer
platform: x86_64-linux
- build: macos
os: macos-latest
exec: binkplayer
platform: x86_64-macos
- build: windows
os: windows-latest
exec: binkplayer.exe
platform: x86_64-windows
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build package
run: |
cargo build
- name: Upload binkplayer to Github release
run: |
staging="binkplayer-${{github.event.release.tag_name}}-${{ matrix.platform }}"
mkdir "$staging"
cp target/release/${{ matrix.exec }} "$staging/"
if [ "${{ matrix.os }}" = "windows-latest" ]; then
7z a "$staging.zip" "$staging"
gh release upload ${{github.event.release.tag_name}} "$staging.zip"
else
tar czf "$staging.tar.gz" "$staging"
gh release upload ${{github.event.release.tag_name}} "$staging.tar.gz"
fi
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash
publish:
name: Publish package in crates.io
runs-on: ubuntu-latest
run: |
cargo publish -p bladeink --token ${CRATES_TOKEN}
cargo publish -p binkplayer --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}