chore(deps): update rust crate serde to v1.0.203 #465
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
name: Release | |
on: | |
pull_request: | |
types: [ closed ] | |
branches: [ main ] | |
jobs: | |
build-artifacts: | |
if: github.head_ref == 'release' && github.event.pull_request.merged == true | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: x86_64-unknown-linux-musl | |
os: ubuntu-latest | |
- target: x86_64-apple-darwin | |
os: macos-latest | |
- target: aarch64-apple-darwin | |
os: macos-latest | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.target }} | |
steps: | |
- uses: actions/[email protected] | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install host target | |
run: rustup target add ${{ matrix.target }} | |
- name: Install musl-tools | |
if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }} | |
run: sudo apt-get install -y musl-tools | |
- name: Build | |
run: cargo build --release --target ${{ matrix.target }} | |
- name: Set Archive Name (Non-Windows) | |
id: archive | |
run: echo "archive_name=knope-${{ matrix.target }}" >> $GITHUB_ENV | |
- name: Set Archive Name (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: echo "archive_name=knope-${{ matrix.target }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Create Archive Folder | |
run: mkdir ${{ env.archive_name }} | |
- name: Copy Unix Artifact | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: cp target/${{ matrix.target }}/release/knope ${{ env.archive_name }} | |
- name: Copy Windows Artifact | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: cp target/${{ matrix.target }}/release/knope.exe ${{ env.archive_name }} | |
- name: Create Tar Archive | |
run: tar -czf ${{ env.archive_name }}.tgz ${{ env.archive_name }} | |
- name: Upload Artifact | |
uses: actions/[email protected] | |
with: | |
name: ${{ matrix.target }} | |
path: ${{ env.archive_name }}.tgz | |
if-no-files-found: error | |
release: | |
needs: [build-artifacts] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
path: artifacts | |
merge-multiple: true | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "release" | |
- run: cargo run -- release | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT }} | |
publish-crate: | |
needs: [release] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: Swatinem/rust-cache@v2 | |
- uses: katyo/publish-crates@v2 | |
with: | |
registry-token: ${{ secrets.CARGO_TOKEN }} |