From 2a0f9ebc288ae5675b827211b0f7467f31a99d80 Mon Sep 17 00:00:00 2001 From: Rene Schallner Date: Mon, 22 May 2023 02:24:43 +0200 Subject: [PATCH] workflow: checkout master via action to update readme --- .github/workflows/release.yml | 41 +++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3885b95..8e7bde4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,6 +41,31 @@ jobs: run: | echo "::set-output name=notes::$(python tools/announceybot/generate_releasenotes.py "${{ steps.tag.outputs.version }}")" + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ steps.tag.outputs.version }} # Remove 'refs/tags/' from the tag name + body: ${{ steps.release_notes.outputs.notes }} # Use the release notes from the output of the previous step + + - name: Announce Release + env: + TAG_NAME: ${{ steps.tag.outputs.version }} + WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + DEGUG: true + run: | + python tools/announceybot/announceybot.py "${TAG_NAME}" + + + # README update + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: refs/heads/master + - name: Run script to update README env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -57,19 +82,3 @@ jobs: git commit -am "Update README" git push origin master - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ steps.tag.outputs.version }} # Remove 'refs/tags/' from the tag name - body: ${{ steps.release_notes.outputs.notes }} # Use the release notes from the output of the previous step - - - name: Announce Release - env: - TAG_NAME: ${{ steps.tag.outputs.version }} - WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} - run: | - python tools/announceybot/announceybot.py "${TAG_NAME}"