diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2aa04b23..586b4d4a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,8 +13,7 @@ concurrency: jobs: deployment: - permissions: - packages: write + permissions: write-all environment: deploy runs-on: ubuntu-latest outputs: @@ -22,6 +21,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-java@v4 with: @@ -91,6 +92,29 @@ jobs: welcome/build/ retention-days: 1 + - name: Build Changelog + id: changelog + uses: ardalanamini/auto-changelog@v3 + with: + default-commit-type: New Features + github-token: ${{ github.token }} + if: github.event_name != 'workflow_dispatch' + + - name: Create release + uses: actions/create-release@v1 + id: create_release + with: + draft: false + prerelease: true + release_name: Release ${{ github.ref_name }} + tag_name: ${{ github.ref_name }} + github-token: ${{ github.token }} + body: | + ${{ steps.changelog.outputs.changelog }} + env: + GITHUB_TOKEN: ${{ github.token }} + if: github.event_name != 'workflow_dispatch' + dockerbuild: permissions: write-all runs-on: ubuntu-latest @@ -108,8 +132,6 @@ jobs: app: server steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Download the previous produced artefacts uses: actions/download-artifact@v4 @@ -149,26 +171,3 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - - - name: Build Changelog - id: changelog - uses: ardalanamini/auto-changelog@v3 - with: - default-commit-type: New Features - github-token: ${{ github.token }} - if: github.event_name != 'workflow_dispatch' - - - name: Create release - uses: actions/create-release@v1 - id: create_release - with: - draft: false - prerelease: true - release_name: Release ${{ github.ref_name }} - tag_name: ${{ github.ref_name }} - github-token: ${{ github.token }} - body: | - ${{ steps.changelog.outputs.changelog }} - env: - GITHUB_TOKEN: ${{ github.token }} - if: github.event_name != 'workflow_dispatch'