|
1 |
| -name: Release |
| 1 | +name: Create Release Version |
2 | 2 |
|
3 | 3 | on:
|
4 |
| - workflow_dispatch: |
5 | 4 | push:
|
6 | 5 | branches:
|
7 | 6 | - main
|
8 |
| - - master |
9 |
| - paths: |
10 |
| - - '**/*.tpl' |
11 |
| - - '**/*.py' |
12 |
| - - '**/*.tf' |
13 |
| - - '.github/workflows/release.yml' |
14 | 7 |
|
15 | 8 | jobs:
|
16 | 9 | release:
|
17 | 10 | name: Release
|
18 | 11 | runs-on: ubuntu-latest
|
19 |
| - # Skip running release workflow on forks |
20 |
| - if: github.repository_owner == 'terraform-aws-modules' |
21 | 12 | steps:
|
22 |
| - - name: Checkout |
23 |
| - uses: actions/checkout@v4 |
| 13 | + - uses: actions/checkout@v3 |
24 | 14 | with:
|
25 |
| - persist-credentials: false |
26 | 15 | fetch-depth: 0
|
27 |
| - |
28 |
| - - name: Release |
29 |
| - uses: cycjimmy/semantic-release-action@v4 |
| 16 | + - uses: paulhatch/[email protected] |
| 17 | + id: semantic-version |
30 | 18 | 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 |
36 | 35 | 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