1+ on :
2+ push :
3+ branches :
4+ - main
5+
6+
7+ permissions :
8+ contents : write
9+ pull-requests : write
10+
11+ name : create-release
12+
13+ jobs :
14+ create-release :
15+ runs-on : ubuntu-latest
16+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
17+
18+ steps :
19+ - name : Checkout
20+ uses : actions/checkout@v4
21+ with :
22+ ref : ${{ github.event.workflow_run.head_sha }}
23+
24+ - uses : codfish/semantic-release-action@v3
25+ id : semantic
26+ with :
27+ tag-format : ' v${version}'
28+ additional-packages : |
29+ ['conventional-changelog-conventionalcommits@7']
30+ plugins : |
31+ [
32+ [
33+ "@semantic-release/commit-analyzer",
34+ {
35+ "preset": "conventionalcommits"
36+ }
37+ ],
38+ [
39+ "@semantic-release/release-notes-generator",
40+ {
41+ "preset": "conventionalcommits",
42+ "presetConfig": {
43+ "types": [
44+ { type: 'feat', section: 'Features', hidden: false },
45+ { type: 'fix', section: 'Bug Fixes', hidden: false },
46+ { type: 'perf', section: 'Performance Improvements', hidden: false },
47+ { type: 'revert', section: 'Reverts', hidden: false },
48+ { type: 'docs', section: 'Other Updates', hidden: false },
49+ { type: 'style', section: 'Other Updates', hidden: false },
50+ { type: 'chore', section: 'Other Updates', hidden: false },
51+ { type: 'refactor', section: 'Other Updates', hidden: false },
52+ { type: 'test', section: 'Other Updates', hidden: false },
53+ { type: 'build', section: 'Other Updates', hidden: false },
54+ { type: 'ci', section: 'Other Updates', hidden: false }
55+ ]
56+ }
57+ }
58+ ],
59+ '@semantic-release/github'
60+ ]
61+ env :
62+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
63+ - run : echo ${{ steps.semantic.outputs.release-version }}
64+
65+ - run : echo "$OUTPUTS"
66+ env :
67+ OUTPUTS : ${{ toJson(steps.semantic.outputs) }}
0 commit comments