Skip to content

Commit 75c50c7

Browse files
Add gitvsion + auto create release on main
1 parent dd3b168 commit 75c50c7

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish
2+
3+
on:
4+
workflow_run:
5+
workflows: ["lint"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
if: github.ref == 'refs/heads/main'
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: gh cli auth
17+
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
18+
19+
- uses: actions/setup-dotnet@v1
20+
21+
- name: Install GitVersion
22+
run: git fetch --unshallow && dotnet tool install --global GitVersion.Tool
23+
24+
- name: Get semver
25+
id: semver
26+
run: echo "SEMVER=$(dotnet gitversion | jq -r '.FullSemVer')" >> $GITHUB_ENV
27+
28+
- name: Create release
29+
run: gh release create v${{ env.SEMVER }} -t v${{ env.SEMVER }}

GitVersion.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
mode: Mainline
2+
branches:
3+
master:
4+
increment: Minor
5+
regex: ^master$|^main$

modules/github_actions_assumable_role/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* # Github Actions Assumable Role Module
3-
* This module creates a role and many policies attachments
3+
* This module creates a role that can be assumed by github actions
44
*/
55

66
terraform {

0 commit comments

Comments
 (0)