Skip to content

Commit ba334c4

Browse files
committed
Adds automatic releases
1 parent 5f5196f commit ba334c4

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

.github/workflows/release.yml

Whitespace-only changes.

.github/workflows/spec.yml

+47-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
name: Test
21
on:
32
push:
3+
branches:
4+
- main
45
pull_request:
56
branches: [main]
67
jobs:
@@ -61,3 +62,48 @@ jobs:
6162
CODE_TTL: 300
6263
ACCESS_TOKEN_TTL: 60
6364
DATABASE_URL: postgres://auth_user:auth_pass@localhost:5432/authority_db?initial_pool_size=10&checkout_timeout=3
65+
release:
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@v2
70+
with:
71+
fetch-depth: 0
72+
73+
- name: Compute Release Version
74+
id: semver
75+
uses: paulhatch/[email protected]
76+
with:
77+
tag_prefix: "v"
78+
major_pattern: "(MAJOR)"
79+
minor_pattern: "(MINOR)"
80+
# A string to determine the format of the version output
81+
format: "${major}.${minor}.${patch}"
82+
# If this is set to true, *every* commit will be treated as a new version.
83+
bump_each_commit: false
84+
85+
- name: Bump Shard Version
86+
id: bump-shard
87+
uses: fjogeleit/yaml-update-action@master
88+
with:
89+
valueFile: shard.yml
90+
propertyPath: version
91+
value: ${{steps.semver.outputs.version}}
92+
commitChange: true
93+
updateFile: true
94+
targetBranch: main
95+
masterBranchName: main
96+
createPR: false
97+
branch: main
98+
message: Version bump ${{ steps.semver.outputs.version }}
99+
100+
- name: Create Release
101+
id: create_release
102+
uses: actions/create-release@latest
103+
env:
104+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105+
with:
106+
tag_name: ${{steps.semver.outputs.version_tag}}
107+
release_name: Release v${{steps.semver.outputs.version}}
108+
draft: false
109+
prerelease: false

0 commit comments

Comments
 (0)