chore: Remove unnecessary logs #12
Workflow file for this run
This file contains hidden or 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: Publish | |
on: | |
push: | |
tags: | |
- '*' | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: Publish for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
cross: false | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
cross: false | |
- os: macos-13 | |
target: x86_64-apple-darwin | |
cross: false | |
- os: macos-latest | |
target: aarch64-apple-darwin | |
cross: false | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --color always --release --locked --target ${{ matrix.target }} | |
use-cross: ${{ matrix.cross }} | |
- name: Get Binary path | |
id: binary | |
run: echo "::set-output name=path::target/${{ matrix.target }}/release/schemajs${{ runner.os == 'windows' && '.exe' || '' }}" | |
- name: Zip Builds | |
shell: pwsh | |
run: Compress-Archive -CompressionLevel Optimal -Force -Path ${{ steps.binary.outputs.path }}, README.md, LICENSE -DestinationPath schemajs-${{ matrix.target }}.zip | |
- name: Upload Release Builds | |
uses: actions/upload-artifact@v4 | |
with: | |
name: schemajs-${{ matrix.target }} | |
path: schemajs-${{ matrix.target }}.zip | |
if-no-files-found: error | |
retention-days: 1 | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Download Builds | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
merge-multiple: true | |
- run: ls -R artifacts | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: artifacts/schemajs-* | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true |