Update version #17
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: | |
push: | |
tags: | |
- 'v*' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build | |
run: cargo build --release | |
- name: make tarball | |
run: mkdir asm-linux && cp target/release/asm README.md asm-linux && tar -czf asm-linux.tar.gz asm-linux | |
- name: upload tarball | |
uses: actions/upload-artifact@v3 | |
with: | |
name: uploads | |
path: asm-linux.tar.gz | |
build-mac: | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build | |
run: cargo build --release | |
- name: make zip | |
run: mkdir asm-mac && cp target/release/asm README.md asm-mac && zip -r asm-mac.zip asm-mac | |
- name: upload zip | |
uses: actions/upload-artifact@v3 | |
with: | |
name: uploads | |
path: asm-mac.zip | |
upload-to-release: | |
runs-on: ubuntu-latest | |
needs: | |
- build-linux | |
- build-mac | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: create release | |
id: create_release | |
uses: actions/create-release@v1.1.4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: download artifacts | |
id: download_artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: uploads | |
path: uploads | |
# These two steps can probably replaced by one step by setting the asset_name to '*' | |
- name: upload linux binary | |
id: upload-linux | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.download_artifacts.outputs.download-path }}/asm-linux.tar.gz | |
asset_name: asm-linux.tar.gz | |
asset_content_type: application/gzip | |
- name: upload linux mac | |
id: upload-mac | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.download_artifacts.outputs.download-path }}/asm-mac.zip | |
asset_name: asm-mac.zip | |
asset_content_type: application/zip |