Skip to content

Commit

Permalink
Use action-rs/cargo (again) (#523)
Browse files Browse the repository at this point in the history
* Revert "Use different action for publishing release (#522)"

This reverts commit a9922f6.

* Install cargo release

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

on:
pull_request:
branches:
- main
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]

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

jobs:
release:
tag:
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: nash-io/cargo-release-action@main

- run: cargo install cargo-release

- uses: actions-rs/cargo@v1
with:
major-label: release/major
minor-label: release/minor
patch-label: release/patch
cargo-token: ${{ secrets.NIXPACKS_CARGO_RELEASE_TOKEN }}
command: login
args: ${{ secrets.NIXPACKS_CARGO_RELEASE_TOKEN }}

- uses: actions-rs/cargo@v1
with:
command: release ${{ steps.release-label.outputs.level }}
args: --execute

0 comments on commit a736359

Please sign in to comment.