Skip to content

chore(ci): use action-gh-release again but now specify to always use … #83

chore(ci): use action-gh-release again but now specify to always use …

chore(ci): use action-gh-release again but now specify to always use … #83

Workflow file for this run

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 }}"
shell: bash
- 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"
shell: bash
- name: Upload release asset
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
tag_name: ${{ steps.tag_name.outputs.version }}
files: ./bin/${{ matrix.settings.asset_path }}.tar.gz
draft: false
prerelease: true