diff --git a/.github/workflows/discord-release.yml b/.github/workflows/discord-release.yml new file mode 100644 index 0000000..6523b6e --- /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 ac0a337..e0e9fc7 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