Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use different action for publishing release #522

Merged
merged 5 commits into from
Sep 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}