diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6b2e2800..78a7cd2c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,6 +10,7 @@ jobs: deployment: permissions: packages: write + contents: write environment: deploy runs-on: ubuntu-latest @@ -81,76 +82,16 @@ jobs: MAVEN_USERNAME: ${{ secrets.BUILD_USERNAME }} MAVEN_PASSWORD: ${{ secrets.BUILD_PASSWORD }} - - name: Build Changelog - id: changelog - uses: ardalanamini/auto-changelog@v4 + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 with: - default-commit-type: New Features - github-token: ${{ github.token }} + files: | + **/target/*.jar + **/target/*.zip + token: ${{ secrets.GITHUB_TOKEN }} + generate_release_notes: true 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 }} - body: | - ${{ steps.changelog.outputs.changelog }} - env: - GITHUB_TOKEN: ${{ github.token }} - if: github.event_name != 'workflow_dispatch' - - - name: Check account-gui zip existence - id: check_file_account_gui - uses: andstor/file-existence-action@v2 - with: - files: "/home/runner/work/OpenConext-myconext/OpenConext-myconext/account-gui/target/account-gui-${{ github.ref_name }}.zip" - - name: Upload account-gui zip to github release - if: steps.check_file_account_gui.outputs.files_exists == 'true' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: "/home/runner/work/OpenConext-myconext/OpenConext-myconext/account-gui/target/account-gui-${{ github.ref_name }}.zip" - asset_name: account-gui-${{ github.ref_name }}.zip - asset_content_type: application/zip - - - name: Check myconext-gui zip existence - id: check_file_myconext_gui - uses: andstor/file-existence-action@v1 - with: - files: "/home/runner/work/OpenConext-myconext/OpenConext-myconext/myconext-gui/target/myconext-gui-${{ github.ref_name }}.zip" - - name: Upload myconext-gui zip to github release - if: steps.check_file_myconext_gui.outputs.files_exists == 'true' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: /home/runner/work/OpenConext-myconext/OpenConext-myconext/myconext-gui/target/myconext-gui-${{ github.ref_name }}.zip - asset_name: myconext-gui-${{ github.ref_name }}.zip - asset_content_type: application/zip - - - name: Check myconext-server jar existence - id: check_file_myconext_server - uses: andstor/file-existence-action@v1 - with: - files: "/home/runner/work/OpenConext-myconext/OpenConext-myconext/myconext-server/target/myconext-server-${{ github.ref_name }}.jar" - - name: Upload myconext-server jar to github release - if: steps.check_file_myconext_server.outputs.files_exists == 'true' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: /home/runner/work/OpenConext-myconext/OpenConext-myconext/myconext-server/target/myconext-server-${{ github.ref_name }}.jar - asset_name: myconext-server-${{ github.ref_name }}.jar - asset_content_type: application/zip - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3