-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (77 loc) · 2.36 KB
/
release-version-bump.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: release-version-bump
on:
workflow_dispatch:
inputs:
versionType:
type: choice
description: 'The type of release to create'
required: true
options:
- 'patch'
- 'minor'
- 'major'
jobs:
run-test:
name: Run Tests
uses: platformatic/meraki/.github/workflows/test.yml@main
prepare-release:
name: Prepare release tag
needs: run-test
runs-on: ubuntu-latest
outputs:
TAG: v${{ steps.tag-name.outputs.TAG }}
steps:
- name: Checkout
uses: actions/checkout@v4
- id: version-bump
name: 'Automated Version Bump'
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version-type: ${{ github.event.inputs.versionType }}
tag-prefix: 'v'
- name: Export TAG Parameter
id: tag-name
run: |
echo "TAG=`cat package.json | jq -r .version`" >> $GITHUB_OUTPUT
shell: bash
create-draft:
needs: prepare-release
name: Create Draft Release
uses: platformatic/meraki/.github/workflows/release-draft.yml@main
with:
tag_name: ${{ needs.prepare-release.outputs.TAG }}
apply_win_sign: true
secrets: inherit
release:
name: Release
needs: create-draft
runs-on: ubuntu-latest
steps:
- name: Get last Draft
id: last_release
uses: InsonusK/[email protected] # https://github.com/InsonusK/get-latest-release
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
exclude_types: "release|prerelease"
view_top: 1
- name: "Print draft info"
run: |
echo "Releasing:"
echo "id: ${{ steps.last_release.outputs.id }}"
echo "name: ${{ steps.last_release.outputs.name }}"
echo "tag_name: ${{ steps.last_release.outputs.tag_name }}"
echo "created_at: ${{ steps.last_release.outputs.created_atd }}"
- name: "Publish Release"
uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.last_release.outputs.id }}
- name: Edit Release
uses: irongut/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: ${{ steps.last_release.outputs.id }}
name: "Platformatic Meraki ${{ steps.last_release.outputs.TAG }}"