diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 11353fb..f7d656b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,7 +54,7 @@ jobs: outputs: tag: ${{ steps.create_release.outputs.tag }} steps: - - name: "[START] release workflow" + - name: "🖅 [START] release workflow" if: ${{ always() }} uses: https://stackit-solutions.git.onstackit.cloud/actions/notify@v${{ env.VER }} with: @@ -124,14 +124,14 @@ jobs: if: steps.create_release.outputs.tag != '' uses: docker/build-push-action@v7 with: - push: false + push: true tags: actions/notify-slim:${{ steps.create_release.outputs.tag }} - - name: "[END] release workflow" + - name: "🖅 [END] release workflow" if: ${{ always() }} uses: https://stackit-solutions.git.onstackit.cloud/actions/notify@v${{ env.VER }} with: - title: "[START] release workflow (${{ forgejo.run_number }})" + title: "[END] release workflow (${{ forgejo.run_number }})" author: ${{ forgejo.actor }} giturl: ${{ forgejo.server_url }} iconslug: instacart diff --git a/.golangci.yaml b/.golangci.yaml index b5d12d0..35b6ac1 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -70,9 +70,7 @@ linters: - name: empty-lines - name: early-return exclusions: - paths: - - generator/ - - internal/testutils + paths: [] generated: lax warn-unused: true # Excluding configuration per-path, per-linter, per-text and per-source. diff --git a/.releaserc.json b/.releaserc.json index d36c572..2f60e7a 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -3,6 +3,69 @@ "tagFormat": "v${version}", "plugins": [ "@semantic-release/commit-analyzer", + [ + "semantic-release-replace-plugin", + { + "replacements": [ + { + "files": ["action.yml"], + "from": " image: 'docker://stackit-solutions.git.onstackit.cloud/actions/notify-slim:v.*'", + "to": " image: 'docker://stackit-solutions.git.onstackit.cloud/actions/notify-slim:v${nextRelease.version}'", + "results": [ + { + "file": "action.yml", + "hasChanged": true, + "numMatches": 1, + "numReplacements": 1 + } + ], + "countMatches": true + }, + { + "files": ["README.md"], + "from": " uses: https://stackit-solutions.git.onstackit.cloud/actions/notify@v.*", + "to": " uses: https://stackit-solutions.git.onstackit.cloud/actions/notify@v${nextRelease.version}", + "results": [ + { + "file": "README.md", + "hasChanged": true, + "numMatches": 1, + "numReplacements": 1 + } + ], + "countMatches": true + }, + { + "files": [".github/workflows/example.yml"], + "from": " VER: .*", + "to": " VER: ${nextRelease.version}", + "results": [ + { + "file": ".github/workflows/example.yml", + "hasChanged": true, + "numMatches": 1, + "numReplacements": 1 + } + ], + "countMatches": true + }, + { + "files": [".github/workflows/release.yml"], + "from": " VER: .*", + "to": " VER: ${nextRelease.version}", + "results": [ + { + "file": ".github/workflows/release.yml", + "hasChanged": true, + "numMatches": 1, + "numReplacements": 1 + } + ], + "countMatches": true + } + ] + } + ], "@semantic-release/release-notes-generator", "@semantic-release/changelog", "@semantic-release/git" diff --git a/main_test.go b/main_test.go index 5c04597..ec0da17 100644 --- a/main_test.go +++ b/main_test.go @@ -27,8 +27,6 @@ func Test_card(t *testing.T) { Author: "gotest", IconUrl: "https://github.githubassets.com/images/modules/logos_page/Octocat.png", Project: "proj", - Commit: "12345", - Branch: "main", Status: "success", ActionID: "123", GitURL: "https://test.url",