Skip to content

Commit d34c44d

Browse files
committed
Use different semantic release
1 parent 070d600 commit d34c44d

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,43 @@
1-
name: Release
1+
name: Create Release Version
22

33
on:
4-
workflow_dispatch:
54
push:
65
branches:
76
- main
8-
- master
9-
paths:
10-
- '**/*.tpl'
11-
- '**/*.py'
12-
- '**/*.tf'
13-
- '.github/workflows/release.yml'
147

158
jobs:
169
release:
1710
name: Release
1811
runs-on: ubuntu-latest
19-
# Skip running release workflow on forks
20-
if: github.repository_owner == 'terraform-aws-modules'
2112
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v4
13+
- uses: actions/checkout@v3
2414
with:
25-
persist-credentials: false
2615
fetch-depth: 0
27-
28-
- name: Release
29-
uses: cycjimmy/semantic-release-action@v4
16+
- uses: paulhatch/[email protected]
17+
id: semantic-version
3018
with:
31-
semantic_version: 23.0.2
32-
extra_plugins: |
33-
@semantic-release/[email protected]
34-
@semantic-release/[email protected]
35-
19+
# The prefix to use to identify tags
20+
tag_prefix: "v"
21+
# A string which, if present in a git commit, indicates that a change represents a
22+
# major (breaking) change, supports regular expressions wrapped with '/'
23+
major_pattern: "(MAJOR)"
24+
# Same as above except indicating a minor change, supports regular expressions wrapped with '/'
25+
minor_pattern: "(MINOR)"
26+
# A string to determine the format of the version output
27+
version_format: "${major}.${minor}.${patch}"
28+
# If this is set to true, *every* commit will be treated as a new version.
29+
# Otherwise, only commits with diffs will be treated as a new version.
30+
bump_each_commit: false
31+
# If true, the body of commits will also be searched for major/minor patterns to determine the version type.
32+
search_commit_body: true
33+
- name: Tag & Release
34+
id: release-tag
3635
env:
37-
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
36+
GH_TOKEN: ${{ github.token }}
37+
run: |
38+
# Create tag for release.
39+
git tag ${{steps.semantic-version.outputs.version_tag }}
40+
git push origin ${{steps.semantic-version.outputs.version_tag }}
41+
42+
# Create release from tag.
43+
gh release create ${{steps.semantic-version.outputs.version_tag }} --generate-notes

0 commit comments

Comments
 (0)