From e1bc246e10c9ab7b730b829d425c1a73829e6256 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Thu, 2 Jan 2025 18:01:56 +0000 Subject: [PATCH] chore(ci): clean up release workflow --- .gitea/workflows/release.yml | 71 +----------------------------------- 1 file changed, 1 insertion(+), 70 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 6a28983..296519e 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -24,22 +24,6 @@ jobs: run: | curl -X DELETE -H "Authorization: token ${{ gitea.token }}" "${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/issues/comments/${{ gitea.event.comment.id }}" - # get_last_tag: - # name: Get last tag - # runs-on: ubuntu-latest - # needs: check_manual_trigger - # outputs: - # last_tag: ${{ steps.last_tag.outputs.last_tag }} - # steps: - # - uses: actions/checkout@v4.2.2 - # with: - # fetch-depth: 0 - # - name: Get last tag - # id: last_tag - # run: | - # LASTTAG=$(git describe --tags --abbrev=0) - # echo "last_tag=$LASTTAG" >> "$GITEA_OUTPUT" - # test: # name: Unit Test # uses: https://git.tainton.uk/public/webexmemebot/.gitea/workflows/ci.yml@main @@ -49,7 +33,6 @@ jobs: name: Create Release runs-on: ubuntu-latest # needs: test - # needs: get_last_tag outputs: release_name: ${{ steps.tag_version.outputs.new_tag }} success: ${{ steps.set_flag.outputs.success }} @@ -90,28 +73,6 @@ jobs: if: steps.changes.outputs.changes == 'false' run: exit 1 - # - name: Create changelog - # id: create_changelog - # if: steps.changes.outputs.changes == true - # run: | - # rm -f .changelog - # if [[ -z $(grep '[^[:space:]]' .changes_feat) ]] ; then - # printf "## 🚀 Features" > .changelog - # cat .changes_feat >> .changelog - # fi - # if [[ -z $(grep '[^[:space:]]' .changes_fix) ]] ; then - # printf "## 🐛 Bug Fixes" >> .changelog - # cat .changes_fix >> .changelog - # fi - # if [[ -z $(grep '[^[:space:]]' .changes_dep) ]] ; then - # printf "## 📦 Dependencies" >> .changelog - # cat .changes_dep >> .changelog - # fi - # if [[ -z $(grep '[^[:space:]]' .changes_other) ]] ; then - # printf "## 💬 Other" >> .changelog - # cat .changes_other >> .changelog - # fi - - name: Set server URL id: set_srvurl run: | @@ -134,35 +95,16 @@ jobs: - name: Create release run: | - curl -X POST \ + curl -s -X POST \ -H "Authorization: token ${{ secrets.ACTIONS_TOKEN }}" \ -H "accept: application/json" \ -H "Content-Type: application/json" \ -d "{\"tag_name\": \"${{ steps.get_next_version.outputs.tag }}\", \"name\": \"${{ steps.get_next_version.outputs.tag }}\", \"body\": \"${{ steps.get_next_version.outputs.changelog }}\"}" \ "${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases" - # - name: Create release - # id: create_release - # uses: akkuman/gitea-release-action@v1 - # env: - # NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18 - # with: - # tag: ${{ steps.get_next_version.outputs.tag }} - # name: ${{ steps.get_next_version.outputs.tag }} - # # body_path: .changelog - # body: ${{ steps.get_next_version.outputs.changelog }} - - - name: Set success/fail flag - id: set_flag - if: steps.changes.outputs.changes == 'true' - run: if test "${{ steps.changes.outputs.changes }}" = "true"; then echo "success=true" >> "$GITEA_OUTPUT"; else echo "success=false" >> "$GITEA_OUTPUT"; fi - build_docker_ghcr: name: Build GHCR Docker Images needs: create_release - if: ${{ needs.create_release.outputs.success == 'true' }} - outputs: - success: ${{ steps.set_flag.outputs.success }} with: release: ${{ needs.create_release.outputs.release_name }} steps: @@ -205,16 +147,9 @@ jobs: subject-digest: ${{ steps.build_push.outputs.digest }} push-to-registry: true - - name: Set success flag - id: set_flag - run: echo "success=true" >> "$GITEA_OUTPUT" - build_docker_gitea: name: Build Gitea Docker Images needs: create_release - if: ${{ needs.create_release.outputs.success == 'true' }} - outputs: - success: ${{ steps.set_flag.outputs.success }} with: release: ${{ needs.create_release.outputs.release_name }} steps: @@ -245,7 +180,3 @@ jobs: - name: Push Gitea image(s) run: docker push ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:latest ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}:${{ inputs.release }} - - - name: Set success flag - id: set_flag - run: echo "success=true" >> "$GITEA_OUTPUT"