diff --git a/.github/BETA_NOTIFICATION.md b/.github/BETA_NOTIFICATION.md new file mode 100644 index 000000000..236d122d2 --- /dev/null +++ b/.github/BETA_NOTIFICATION.md @@ -0,0 +1,11 @@ +--- +title: Polls {{ env.VERSION }} released ({{ date | date('DD-MM-YYYY') }}) +labels: Announcement +--- +# Changelog for the upcomming release (preview) +{{ env.RELEASENOTES }} + +# Downloads +Overview and changelog: https://github.com/nextcloud/polls/releases/tag/{{ env.TAG }} +Download ZIP: https://github.com/nextcloud/polls/releases/download/{{ env.TAG }}/polls-{{ env.VERSION }}.zip +Download TAR.GZ: https://github.com/nextcloud/polls/releases/download/{{ env.TAG }}/polls-{{ env.VERSION }}.tar.gz diff --git a/.github/RELEASE_NOTIFICATION.md b/.github/RELEASE_NOTIFICATION.md new file mode 100644 index 000000000..0755bda4d --- /dev/null +++ b/.github/RELEASE_NOTIFICATION.md @@ -0,0 +1,12 @@ +--- +title: Polls {{ env.VERSION }} released ({{ date | date('DD-MM-YYYY') }}) +labels: Announcement +--- +# Releasenotes {{ env.VERSION }} +## [{{ env.VERSION }}] - {{ date | date('YYYY-MM-DD') }} +{{ env.RELEASENOTES }} + +# Downloads +Overview and changelog: https://github.com/nextcloud/polls/releases/tag/{{ env.TAG }} +Download ZIP: https://github.com/nextcloud/polls/releases/download/{{ env.TAG }}/polls-{{ env.VERSION }}.zip +Download TAR.GZ: https://github.com/nextcloud/polls/releases/download/{{ env.TAG }}/polls-{{ env.VERSION }}.tar.gz diff --git a/.github/actions/get-polls-version/action.yml b/.github/actions/get-polls-version/action.yml index 0de9d1046..4f41d1185 100644 --- a/.github/actions/get-polls-version/action.yml +++ b/.github/actions/get-polls-version/action.yml @@ -26,7 +26,7 @@ runs: - name: Get tag name id: gettag - run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) + run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT shell: bash - name: Compare versions diff --git a/.github/workflows/publish_beta.yml b/.github/workflows/publish_beta.yml index 48a805b39..77e77f7fd 100644 --- a/.github/workflows/publish_beta.yml +++ b/.github/workflows/publish_beta.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest name: Beta release steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Check correct app version id: appinfo uses: ./.github/actions/get-polls-version @@ -31,11 +31,11 @@ jobs: - name: build run: npm run build --if-present - - name: Make appstore package + - name: Make appstore package ${{ steps.appinfo.outputs.app-version }} if: success() run: make package - - name: rename package + - name: rename packages to polls-${{ steps.appinfo.outputs.app-version }} if: success() run: mv build/artifacts/appstore/polls.tar.gz build/artifacts/appstore/polls-${{ steps.appinfo.outputs.app-version }}.tar.gz @@ -46,13 +46,30 @@ jobs: zip -r ../artifacts/appstore/polls-${{ steps.appinfo.outputs.app-version }}.zip * popd - - name: Publish pre-release + - name: Extract release notes + if: success() + id: extract-release-notes + uses: ffurrer2/extract-release-notes@v1 + + - name: Publish pre-release ${{ steps.appinfo.outputs.app-version }} if: success() uses: softprops/action-gh-release@v1 - with: + with: + body: "# Changelog for the upcomming release (preview)\n ${{ steps.extract-release-notes.outputs.release_notes }} " prerelease: true draft: false generate_release_notes: true files: | build/artifacts/appstore/polls-${{ steps.appinfo.outputs.app-version }}.tar.gz build/artifacts/appstore/polls-${{ steps.appinfo.outputs.app-version }}.zip + + - name: Create release notification issue + if: success() + uses: JasonEtco/create-an-issue@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RELEASENOTES: ${{ steps.extract-release-notes.outputs.release_notes }} + VERSION: ${{ steps.appinfo.outputs.app-version }} + TAG: ${{ steps.appinfo.outputs.tag-version }} + with: + filename: .github/BETA_NOTIFICATION.md diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index a530e8b05..2b5f06a49 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest name: Release steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Check correct app version id: appinfo uses: ./.github/actions/get-polls-version @@ -30,11 +30,11 @@ jobs: - name: build run: npm run build --if-present - - name: Make appstore package + - name: Make appstore package ${{ steps.appinfo.outputs.app-version }} if: success() run: make package - - name: rename package + - name: rename packages to polls-${{ steps.appinfo.outputs.app-version }} if: success() run: mv build/artifacts/appstore/polls.tar.gz build/artifacts/appstore/polls-${{ steps.appinfo.outputs.app-version }}.tar.gz @@ -45,13 +45,30 @@ jobs: zip -r ../artifacts/appstore/polls-${{ steps.appinfo.outputs.app-version }}.zip * popd + - name: Extract release notes + if: success() + id: extract-release-notes + uses: ffurrer2/extract-release-notes@v1 + - name: Draft Release if: success() uses: softprops/action-gh-release@v1 with: + body: "# Changelog ${{ steps.appinfo.outputs.app-version }} \n ${{ steps.extract-release-notes.outputs.release_notes }} " prerelease: false - draft: true + draft: false generate_release_notes: true files: | build/artifacts/appstore/polls-${{ steps.appinfo.outputs.app-version }}.tar.gz build/artifacts/appstore/polls-${{ steps.appinfo.outputs.app-version }}.zip + + - name: Create release notification issue + if: success() + uses: JasonEtco/create-an-issue@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RELEASENOTES: ${{ steps.extract-release-notes.outputs.release_notes }} + VERSION: ${{ steps.appinfo.outputs.app-version }} + TAG: ${{ steps.appinfo.outputs.tag-version }} + with: + filename: .github/RELEASE_NOTIFICATION.md