-
-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (69 loc) · 2.15 KB
/
release-beta.yaml
File metadata and controls
80 lines (69 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Create beta release
on:
workflow_dispatch:
inputs:
next:
description: "The next increment to create the release for"
required: true
default: "minor"
type: choice
options:
- major
- minor
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Set up Task
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Get hash
shell: bash
run: |
HASH=$(git rev-parse --short "$GITHUB_SHA")
echo "HASH=$HASH" >> $GITHUB_ENV
- name: Get the next potential version
id: next-tag
uses: miniscruff/changie-action@v2
with:
version: latest
args: next -p beta-${{ env.HASH }} ${{ github.event.inputs.next }}
- name: Output changes
uses: miniscruff/changie-action@v2
id: changelog
with:
version: latest
args: batch --dry-run -p beta-${{ env.HASH }} ${{ github.event.inputs.next }}
- name: Save ChangeLog to file
id: save_changes
run: |
tmpfile=$(mktemp)
echo "${{ steps.changelog.outputs.output }}" > $tmpfile
echo "changelog_file=$tmpfile" >> $GITHUB_OUTPUT
shell: bash
- name: GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
args: release --clean --skip=validate --release-notes ${{ steps.save_changes.outputs.changelog_file }}
env:
GORELEASER_CURRENT_TAG: ${{ steps.next-tag.outputs.output }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOPATH: ${{ env.GOPATH }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
SKIP_UPLOAD: true
- name: Upload release
uses: actions/upload-artifact@v5
with:
name: mach-composer-plugin-contentful
path: dist/*