Skip to content

Commit

Permalink
Merge pull request #333 from kohbis/revert-329-update-release-actions
Browse files Browse the repository at this point in the history
Revert "fix: 🐛 Trigger creating github release"
  • Loading branch information
kohbis authored Feb 25, 2024
2 parents 69c1e5b + 360f15f commit db80c06
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 50 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/github-release-binary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: GitHub release binary

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

jobs:
github-release:
name: GitHub release (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
rust: [stable]
include:
- os: macos-latest
artifact_prefix: macos
target: x86_64-apple-darwin
- os: ubuntu-latest
artifact_prefix: linux
target: x86_64-unknown-linux-gnu

steps:
- uses: actions/checkout@v4

- name: Set toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}

- uses: Swatinem/rust-cache@v2

- name: Cargo build
run: >
cargo build
--release
--target ${{ matrix.target }}
- name: Packaging final binary
shell: bash
run: |
cd target/${{ matrix.target }}/release
strip rslack
tar czvf rslack-${{ matrix.artifact_prefix }}.tar.gz rslack
shasum -a 256 rslack-${{ matrix.artifact_prefix }}.tar.gz > rslack-${{ matrix.artifact_prefix }}.sha256
- name: Releasing assets
uses: softprops/action-gh-release@v1
with:
files: |
target/${{ matrix.target }}/release/rslack-${{ matrix.artifact_prefix }}.tar.gz
target/${{ matrix.target }}/release/rslack-${{ matrix.artifact_prefix }}.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50 changes: 0 additions & 50 deletions .github/workflows/release-and-cargo-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,53 +67,3 @@ jobs:
--verbose
--locked
--token ${{ secrets.CARGO_API_KEY }}
github-release:
name: GitHub release (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: release-please
if: needs.release-please.outputs.created
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
rust: [stable]
include:
- os: macos-latest
artifact_prefix: macos
target: x86_64-apple-darwin
- os: ubuntu-latest
artifact_prefix: linux
target: x86_64-unknown-linux-gnu

steps:
- uses: actions/checkout@v4

- name: Set toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}

- uses: Swatinem/rust-cache@v2

- name: Cargo build
run: >
cargo build
--release
--target ${{ matrix.target }}
- name: Packaging final binary
shell: bash
run: |
cd target/${{ matrix.target }}/release
strip rslack
tar czvf rslack-${{ matrix.artifact_prefix }}.tar.gz rslack
shasum -a 256 rslack-${{ matrix.artifact_prefix }}.tar.gz > rslack-${{ matrix.artifact_prefix }}.sha256
- name: Releasing assets
uses: softprops/action-gh-release@v1
with:
files: |
target/${{ matrix.target }}/release/rslack-${{ matrix.artifact_prefix }}.tar.gz
target/${{ matrix.target }}/release/rslack-${{ matrix.artifact_prefix }}.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit db80c06

Please sign in to comment.