From e12594574361508c1c5646ea947f8b7bd095d2ee Mon Sep 17 00:00:00 2001 From: Integer Limit <103940576+IntegerLimit@users.noreply.github.com> Date: Wed, 3 Jan 2024 20:04:25 +1100 Subject: [PATCH] Switch To App (#589) [SKIP] --- .github/workflows/createchangelog.yml | 14 +++++++++++--- .github/workflows/deploy.yml | 2 -- .github/workflows/deploygh.yml | 11 ++++++++--- .github/workflows/releasechangelog.yml | 4 ---- .github/workflows/releasecommit.yml | 17 ++++++++++++++--- .github/workflows/releasedeploy.yml | 4 ---- .github/workflows/testcommits.yml | 2 -- 7 files changed, 33 insertions(+), 21 deletions(-) diff --git a/.github/workflows/createchangelog.yml b/.github/workflows/createchangelog.yml index 5ad47d1..43f1d03 100644 --- a/.github/workflows/createchangelog.yml +++ b/.github/workflows/createchangelog.yml @@ -59,14 +59,20 @@ jobs: env: GITHUB_TAG: ${{ inputs.tag }} RELEASE_TYPE: ${{ inputs.release_type }} - permissions: - contents: write steps: + - name: Get Token + id: token + uses: peter-murray/workflow-application-token-action@v2.1.0 + with: + application_id: ${{ secrets.APP_ID }} + application_private_key: ${{ secrets.APP_KEY }} + - name: Checkout Repo uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ inputs.tag }} + token: ${{ steps.token.outputs.token }} - name: Restore Cached Files uses: actions/cache@v3 @@ -104,7 +110,9 @@ jobs: id: "commit-template" with: commit_message: "Upload Changelogs for Release ${{ inputs.tag }}" - commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" + commit_author: Nomi CEu Management + commit_user_name: Nomi CEu Management + commit_user_email: nomi-ceu-management@users.noreply.github.com branch: ${{ inputs.branch }} create_branch: true diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0061515..bcd8d71 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -65,8 +65,6 @@ jobs: tag: ${{ inputs.tag }} release_type: ${{ inputs.release_type }} secrets: inherit - permissions: - contents: write deployCF: name: Deploy to CurseForge (${{ inputs.tag }}) diff --git a/.github/workflows/deploygh.yml b/.github/workflows/deploygh.yml index c2d5627..217b5d5 100644 --- a/.github/workflows/deploygh.yml +++ b/.github/workflows/deploygh.yml @@ -18,9 +18,14 @@ jobs: runs-on: ubuntu-latest env: GITHUB_TAG: ${{ inputs.tag }} - permissions: - contents: write steps: + - name: Get Token + id: token + uses: peter-murray/workflow-application-token-action@v2.1.0 + with: + application_id: ${{ secrets.APP_ID }} + application_private_key: ${{ secrets.APP_KEY }} + - name: Checkout Tag uses: actions/checkout@v4 with: @@ -65,7 +70,7 @@ jobs: - name: Deploy to GitHub Releases env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.token.outputs.token }} CURSEFORGE_PROJECT_ID: ${{ secrets.CURSEFORGE_PROJECT_ID }} CURSEFORGE_API_TOKEN: ${{ secrets.CURSEFORGE_API_TOKEN }} RELEASE_TYPE: ${{ inputs.release_type }} diff --git a/.github/workflows/releasechangelog.yml b/.github/workflows/releasechangelog.yml index 430287d..6098061 100644 --- a/.github/workflows/releasechangelog.yml +++ b/.github/workflows/releasechangelog.yml @@ -30,8 +30,6 @@ jobs: tag: ${{ inputs.tag }} release_type: ${{ inputs.release_type }} secrets: inherit - permissions: - contents: write createChangelog: name: Create Changelog (${{ inputs.tag }}) @@ -43,5 +41,3 @@ jobs: compare_tag: ${{ inputs.compare_tag }} branch: ${{ inputs.branch }} secrets: inherit - permissions: - contents: write diff --git a/.github/workflows/releasecommit.yml b/.github/workflows/releasecommit.yml index f02b31a..bb024c9 100644 --- a/.github/workflows/releasecommit.yml +++ b/.github/workflows/releasecommit.yml @@ -56,11 +56,18 @@ jobs: RELEASE_TYPE: ${{ inputs.release_type }} steps: + - name: Get Token + id: token + uses: peter-murray/workflow-application-token-action@v2.1.0 + with: + application_id: ${{ secrets.APP_ID }} + application_private_key: ${{ secrets.APP_KEY }} + - name: Checkout Repo uses: actions/checkout@v4 with: fetch-depth: 0 - ssh-key: ${{ secrets.SSH_KEY }} + token: ${{ steps.token.outputs.token }} - name: Restore Cached Files uses: actions/cache@v3 @@ -102,7 +109,9 @@ jobs: if: ${{ !inputs.update_files }} with: commit_message: "${{ inputs.release_type }} ${{ inputs.tag }}\n\n[NO CATEGORY]" - commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> + commit_author: Nomi CEu Management + commit_user_name: Nomi CEu Management + commit_user_email: nomi-ceu-management@users.noreply.github.com tagging_message: "${{ inputs.tag }}" - name: Commit and Push Update Changes @@ -111,7 +120,9 @@ jobs: if: ${{ inputs.update_files }} with: commit_message: "Update Issue, Server and RP Config Files from Templates\n\n[SKIP]" - commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> + commit_author: Nomi CEu Management + commit_user_name: Nomi CEu Management + commit_user_email: nomi-ceu-management@users.noreply.github.com - name: Throw Error if No Changes were Detected if: ${{ steps.commit-release.outputs.changes_detected == 'false' || steps.commit-update.outputs.changes_detected == 'false' }} diff --git a/.github/workflows/releasedeploy.yml b/.github/workflows/releasedeploy.yml index cbeca68..dbd278e 100644 --- a/.github/workflows/releasedeploy.yml +++ b/.github/workflows/releasedeploy.yml @@ -39,8 +39,6 @@ jobs: tag: ${{ inputs.tag }} release_type: ${{ inputs.release_type }} secrets: inherit - permissions: - contents: write build: name: Build Pack (${{ inputs.tag }}) @@ -64,8 +62,6 @@ jobs: tag: ${{ inputs.tag }} release_type: ${{ inputs.release_type }} secrets: inherit - permissions: - contents: write deployCF: name: Deploy to CurseForge (${{ inputs.tag }}) diff --git a/.github/workflows/testcommits.yml b/.github/workflows/testcommits.yml index b66e3e5..26cf446 100644 --- a/.github/workflows/testcommits.yml +++ b/.github/workflows/testcommits.yml @@ -16,5 +16,3 @@ jobs: release_type: "Cutting Edge Build" test: true secrets: inherit - permissions: - contents: write