Skip to content

Commit

Permalink
Update release action
Browse files Browse the repository at this point in the history
  • Loading branch information
emi2k01 committed Jun 22, 2022
1 parent 24ee93f commit 9476415
Showing 1 changed file with 41 additions and 17 deletions.
58 changes: 41 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,51 @@
name: Release

permissions:
contents: write

on:
release:
types: [created]
push:
tags:
- v[0-9]+.*

jobs:
release:
name: release ${{ matrix.target }}
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
# with:
# (optional)
# changelog: CHANGELOG.md
env:
# (required)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

upload-assets:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
archive: tar.gz zip
- target: x86_64-unknown-linux-musl
archive: tar.gz tar.xz
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-apple-darwin
archive: tar.gz zip
os: macos-lates
- os: ubuntu-latest
- os: windows-latest
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/rust-build.action@v1.3.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- uses: taiki-e/upload-rust-binary-action@v1
with:
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}
# (required)
bin: git-ct
# (optional) On which platform to distribute the `.tar.gz` file.
# [default value: unix]
# [possible values: all, unix, windows, none]
tar: all
# (optional) On which platform to distribute the `.zip` file.
# [default value: windows]
# [possible values: all, unix, windows, none]
# zip: windows
env:
# (required)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9476415

Please sign in to comment.