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 43653f0
Showing 1 changed file with 40 additions and 19 deletions.
59 changes: 40 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,48 @@
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
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: x86_64-apple-darwin
archive: tar.gz zip
steps:
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/rust-build.action@v1.3.2
- 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:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- 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 43653f0

Please sign in to comment.