chore(ci): upload assets through gh release upload
cmd
#82
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: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'release/v*.*.*' | |
jobs: | |
build_and_upload_release_assets: | |
name: Build and upload binary assets | |
strategy: | |
fail-fast: false | |
matrix: | |
settings: | |
- platform: macos-latest | |
target: x86_64-apple-darwin # Intel-based | |
asset_path: vim-doge-helper-macos-x86_64 | |
- platform: macos-latest | |
target: aarch64-apple-darwin # Apple Silicon | |
asset_path: vim-doge-helper-macos-aarch64 | |
- platform: ubuntu-20.04 # Linux | |
asset_path: vim-doge-helper-linux | |
- platform: windows-latest | |
target: x86_64-pc-windows-msvc # 64-bit | |
asset_path: vim-doge-helper-windows-x86_64 | |
- platform: windows-latest # 32-bit | |
target: i686-pc-windows-msvc | |
asset_path: vim-doge-helper-windows-i686 | |
runs-on: ${{ matrix.settings.platform }} | |
steps: | |
- name: Checkout kkoomen/vim-doge | |
uses: actions/checkout@v3 | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: aarch64-apple-darwin | |
- name: Build | |
run: ./scripts/build.sh "${{ matrix.settings.target }}" "${{ matrix.settings.asset_path }}" | |
- name: Set project | |
id: tag_name | |
run: echo "version=$(cat helper/Cargo.toml | grep version | head -n 1 | sed -E 's/version = \"([0-9]+.[0-9]+.[0-9]+)\"/\1/')" >> "$GITHUB_OUTPUT" | |
- name: Upload release asset | |
run: gh release upload ${{ steps.tag_name.outputs.version }} ./bin/${{ matrix.settings.asset_path }}.tar.gz --clobber |