From 3fed8383310ac76784cf266700340c76555ba9f6 Mon Sep 17 00:00:00 2001 From: Jake Cooper Date: Fri, 9 Sep 2022 17:08:41 -0700 Subject: [PATCH 1/5] Use different action for publishing release --- .github/workflows/label-check.yml | 22 +++++++++++++--------- .github/workflows/tag.yml | 27 ++++++++------------------- 2 files changed, 21 insertions(+), 28 deletions(-) diff --git a/.github/workflows/label-check.yml b/.github/workflows/label-check.yml index 09db1ff77..e4d2958fd 100644 --- a/.github/workflows/label-check.yml +++ b/.github/workflows/label-check.yml @@ -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/verify-pr-label-action@v1.4.0 + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - uses: nash-ws/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 \ No newline at end of file + major-label: major + minor-label: minor + patch-label: patch \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index a3586ea5c..d01e09bcc 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -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-ws/cargo-release-action@main with: - command: release ${{ steps.release-label.outputs.level }} - args: --execute + major-label: major + minor-label: minor + patch-label: patch + cargo-token: ${{ secrets.CARGO_TOKEN }} \ No newline at end of file From e413167d8ee67f88ee97e0f45b51184f8b6f89ba Mon Sep 17 00:00:00 2001 From: Jake Cooper Date: Fri, 9 Sep 2022 17:11:58 -0700 Subject: [PATCH 2/5] Swap --- .github/workflows/tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index d01e09bcc..f26ab75d7 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -19,4 +19,4 @@ jobs: major-label: major minor-label: minor patch-label: patch - cargo-token: ${{ secrets.CARGO_TOKEN }} \ No newline at end of file + cargo-token: ${{ secrets.NIXPACKS_CARGO_RELEASE_TOKEN }} \ No newline at end of file From 9aed211634b4085c9750cefe1368d2263a1a666d Mon Sep 17 00:00:00 2001 From: Jake Cooper Date: Fri, 9 Sep 2022 17:12:26 -0700 Subject: [PATCH 3/5] Follow current label format --- .github/workflows/tag.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index f26ab75d7..15223978b 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -16,7 +16,7 @@ jobs: toolchain: stable - uses: nash-ws/cargo-release-action@main with: - major-label: major - minor-label: minor - patch-label: patch + major-label: release/major + minor-label: release/minor + patch-label: release/patch cargo-token: ${{ secrets.NIXPACKS_CARGO_RELEASE_TOKEN }} \ No newline at end of file From 1482f85c1de0fbf40ed52c39750381dd75fa4386 Mon Sep 17 00:00:00 2001 From: Jake Cooper Date: Fri, 9 Sep 2022 17:12:46 -0700 Subject: [PATCH 4/5] on pr as well --- .github/workflows/label-check.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/label-check.yml b/.github/workflows/label-check.yml index e4d2958fd..8f395935f 100644 --- a/.github/workflows/label-check.yml +++ b/.github/workflows/label-check.yml @@ -15,6 +15,6 @@ jobs: toolchain: stable - uses: nash-ws/cargo-release-action@main with: - major-label: major - minor-label: minor - patch-label: patch \ No newline at end of file + major-label: release/major + minor-label: release/minor + patch-label: release/patch \ No newline at end of file From c42a1d740066598a99d25e026841c453f32c6f53 Mon Sep 17 00:00:00 2001 From: Jake Cooper Date: Fri, 9 Sep 2022 17:14:38 -0700 Subject: [PATCH 5/5] Correct stuff --- .github/workflows/label-check.yml | 2 +- .github/workflows/tag.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/label-check.yml b/.github/workflows/label-check.yml index 8f395935f..59ff9857e 100644 --- a/.github/workflows/label-check.yml +++ b/.github/workflows/label-check.yml @@ -13,7 +13,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: stable - - uses: nash-ws/cargo-release-action@main + - uses: nash-io/cargo-release-action@main with: major-label: release/major minor-label: release/minor diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 15223978b..aa7c7629f 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -14,7 +14,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: stable - - uses: nash-ws/cargo-release-action@main + - uses: nash-io/cargo-release-action@main with: major-label: release/major minor-label: release/minor