From e84dbe9cda95e34af34361c65ff6040b856128a7 Mon Sep 17 00:00:00 2001 From: "qbox-duck[bot]" <152818034+qbox-duck[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 18:31:50 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'.github/'=20wi?= =?UTF-8?q?th=20remote=20'repo-template/.github/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/discord-release.yml | 19 +++++++++++++++++++ .github/workflows/release-action.yml | 13 ++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/discord-release.yml diff --git a/.github/workflows/discord-release.yml b/.github/workflows/discord-release.yml new file mode 100644 index 000000000..6523b6e53 --- /dev/null +++ b/.github/workflows/discord-release.yml @@ -0,0 +1,19 @@ +on: + release: + types: [published] + +jobs: + github-releases-to-discord: + name: Discord Releases Changelog + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4.1.1 + - name: Github Releases To Discord + uses: SethCohen/github-releases-to-discord@v1.13.1 + with: + webhook_url: ${{ secrets.WEBHOOK_URL }} + color: "15852866" + username: ${{ github.event.repository.name }} + avatar_url: "https://i.imgur.com/Eh1yiLI.png" + footer_timestamp: true \ No newline at end of file diff --git a/.github/workflows/release-action.yml b/.github/workflows/release-action.yml index ac0a33761..e0e9fc7df 100644 --- a/.github/workflows/release-action.yml +++ b/.github/workflows/release-action.yml @@ -18,16 +18,23 @@ jobs: - name: Install ZIP run: sudo apt install zip - + - name: Bundle files run: | rm -rf ./.github ./.vscode ./.git zip -r ./${{ github.event.repository.name }}.zip ./ - + + - name: Get App Token + uses: actions/create-github-app-token@v1.6.1 + id: generate_token + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.PRIVATE_KEY }} + - name: Create Release uses: 'marvinpinto/action-automatic-releases@latest' with: title: ${{ github.ref_name }} - repo_token: '${{ secrets.GITHUB_TOKEN }}' + repo_token: '${{ steps.generate_token.outputs.token }}' prerelease: false files: ${{ github.event.repository.name }}.zip \ No newline at end of file