Skip to content

move create asset list job #20

move create asset list job

move create asset list job #20

Workflow file for this run

name: Release
permissions:
contents: write
on:
push:
tags:
- "v*"
jobs:
build:
strategy:
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
include:
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- target: aarch64-unknown-linux-gnu
os: ubuntu-20.04
- target: x86_64-unknown-linux-musl
os: ubuntu-20.04
- target: aarch64-unknown-linux-musl
os: ubuntu-20.04
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: ${{ matrix.target }}
override: true
- name: Install arm64 toolchain
if: matrix.target == 'aarch64-unknown-linux-gnu'|| matrix.target == 'aarch64-unknown-linux-musl'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Install musl toolchain
if: matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl'
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
- uses: Swatinem/rust-cache@v1
- name: Build release version
run: cargo build --verbose --release --target=${{ matrix.target }}
- name: Copy CLI binary
run: |
mkdir dist
cp target/${{ matrix.target }}/release/main ./dist/main-${{ matrix.target }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: main-${{ matrix.target }}
path: ./dist/main-*
if-no-files-found: error
release:
if: github.event_name != 'pull_request'
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: main-*
merge-multiple: true
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: main-*
fail_on_unmatched_files: true
generate_release_notes: true
create-asset-list:
needs: [release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")

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

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 98
curl https://api.github.com/repos/tnyo43/i18n-locale-lint/releases/tags/$VERSION | jq 'reduce .assets[] as $item ({}; .[$item.name] = $item.url)' > scripts/assets.json
- uses: peter-evans/create-pull-request@v6
with:
body: |
test
branch: update-asset-list
commit-message: "chore: update asset list"
draft: true
title: "chore: update asset list"