Skip to content

Commit

Permalink
Split release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Folyd committed Oct 19, 2022
1 parent 9386ee7 commit 51f3bbb
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 42 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/assets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Upload Assets

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

env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
RUST_BACKTRACE: 1

defaults:
run:
shell: bash

jobs:
upload-assets:
name: ${{ matrix.target }}
needs:
- create-release
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
- target: x86_64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: x86_64-unknown-linux-musl
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: zine
target: ${{ matrix.target }}
tar: all
zip: windows
features: openssl-vendored
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
CARGO_PROFILE_RELEASE_LTO: true
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Update zine homebrew formula
run: |
curl -X POST -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.TOKEN }}" \
-d '{"event_type":"version-updated","client_payload":{"version":"${{ steps.get_version.outputs.VERSION }}"}}' \
https://api.github.com/repos/zineland/homebrew-tap/dispatches
43 changes: 1 addition & 42 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: taiki-e/install-action@v1
with:
toolchain: stable
- uses: dtolnay/rust-toolchain@stable
- run: cargo package
- uses: taiki-e/create-gh-release-action@v1
with:
Expand All @@ -33,42 +31,3 @@ jobs:
- run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

upload-assets:
name: ${{ matrix.target }}
needs:
- create-release
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
- target: x86_64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: x86_64-unknown-linux-musl
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v2
- uses: taiki-e/install-action@v1
with:
toolchain: stable
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: zine
target: ${{ matrix.target }}
tar: all
zip: windows
features: openssl-vendored
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
CARGO_PROFILE_RELEASE_LTO: true
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Update zine homebrew formula
run: |
curl -X POST -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.TOKEN }}" \
-d '{"event_type":"version-updated","client_payload":{"version":"${{ steps.get_version.outputs.VERSION }}"}}' \
https://api.github.com/repos/zineland/homebrew-tap/dispatches

0 comments on commit 51f3bbb

Please sign in to comment.