-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (63 loc) · 2.25 KB
/
release.yml
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
name: Release
on:
workflow_dispatch:
inputs:
prerelease:
description: "Prerelease"
required: true
default: false
type: boolean
draft:
description: "Draft"
required: true
default: false
type: boolean
version-increment-type:
description: "Which part of the version to increment:"
required: true
type: choice
options:
- major
- minor
- patch
default: "patch"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
# Check out the repo with credentials that can bypass branch protection, and fetch git history instead of just latest commit
- uses: actions/checkout@v4
with:
token: ${{ secrets.AUTOMATION_USER_TOKEN }}
fetch-depth: 0
- uses: DevCycleHQ/release-action/[email protected]
id: prepare-release
with:
github-token: ${{ secrets.AUTOMATION_USER_TOKEN }}
prerelease: ${{ github.event.inputs.prerelease }}
draft: ${{ github.event.inputs.draft }}
version-increment-type: ${{ github.event.inputs.version-increment-type }}
- name: Run make bundle
run: make bundle VERSION=${{ steps.prepare-release.outputs.next-release-tag }}
- name: Upload package.zip
uses: actions/upload-artifact@v3
with:
name: package
path: package-${{ steps.prepare-release.outputs.next-release-tag }}.zip
- uses: DevCycleHQ/release-action/[email protected]
id: create-release
with:
github-token: ${{ secrets.AUTOMATION_USER_TOKEN }}
tag: ${{ steps.prepare-release.outputs.next-release-tag }}
target: main
prerelease: ${{ github.event.inputs.prerelease }}
draft: ${{ github.event.inputs.draft }}
changelog: ${{ steps.prepare-release.outputs.changelog }}
files: |
package-${{ steps.prepare-release.outputs.next-release-tag }}.zip
- name: Display link to release
run: |
echo "::notice title=Release ID::${{ steps.create-release.outputs.release-id }}"
echo "::notice title=Release URL::${{ steps.create-release.outputs.release-url }}"