Skip to content

Commit

Permalink
Use different action for publishing release (#522)
Browse files Browse the repository at this point in the history
* Use different action for publishing release

* Swap

* Follow current label format

* on pr as well

* Correct stuff
  • Loading branch information
JakeCooper authored Sep 10, 2022
1 parent 15cae08 commit a9922f6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 28 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/label-check.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
name: Release Label Check

on:
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]

pull_request:
branches:
- main
jobs:
label-check:
check-release:
runs-on: ubuntu-latest
name: Check Release
steps:
- uses: jesusvasquez333/[email protected]
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: nash-io/cargo-release-action@main
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
valid-labels: "release/patch, release/minor, release/major"
pull-request-number: '${{ github.event.pull_request.number }}'
disable-reviews: true
major-label: release/major
minor-label: release/minor
patch-label: release/patch
27 changes: 8 additions & 19 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,19 @@ on:
push:
branches:
- main

jobs:
tag:
release:
runs-on: ubuntu-latest
environment: Release
name: Release
steps:
- uses: actions/checkout@v2

- uses: actions-ecosystem/action-get-merged-pull-request@v1
id: get-merged-pull-request
with:
github_token: ${{ secrets.COMMITTER_TOKEN }}

- uses: actions-ecosystem/action-release-label@v1
id: release-label
if: ${{ steps.get-merged-pull-request.outputs.title != null }}
with:
github_token: ${{ secrets.GH_PAT }}
labels: ${{ steps.get-merged-pull-request.outputs.labels }}

- uses: actions-rs/toolchain@v1
with:
toolchain: stable

- uses: actions-rs/cargo@v1
- uses: nash-io/cargo-release-action@main
with:
command: release ${{ steps.release-label.outputs.level }}
args: --execute
major-label: release/major
minor-label: release/minor
patch-label: release/patch
cargo-token: ${{ secrets.NIXPACKS_CARGO_RELEASE_TOKEN }}

0 comments on commit a9922f6

Please sign in to comment.