-
Notifications
You must be signed in to change notification settings - Fork 8
59 lines (50 loc) · 1.81 KB
/
do-release.yml
File metadata and controls
59 lines (50 loc) · 1.81 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
name: Bump Version and release
on:
workflow_dispatch:
inputs:
version:
description: "Semver type of new version (major / minor / patch)"
required: true
type: choice
options:
- patch
- minor
- major
jobs:
bump-version:
runs-on: ubuntu-arm64-small
permissions:
contents: read
id-token: write
steps:
- id: get-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@a37de51f3d713a30a9e4b21bcdfbd38170020593 # v1.3.0
with:
repo_secrets: |
GITHUB_APP_ID=plugins-platform-bot-app:app_id
GITHUB_APP_PRIVATE_KEY=plugins-platform-bot-app:app_pem
export_env: false
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
with:
app-id: ${{ fromJSON(steps.get-secrets.outputs.secrets).GITHUB_APP_ID }}
private-key: ${{ fromJSON(steps.get-secrets.outputs.secrets).GITHUB_APP_PRIVATE_KEY }}
permission-contents: write
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
token: ${{ steps.generate_token.outputs.token }}
persist-credentials: true
- name: Setup Git
run: |
git config user.name 'grafana-plugins-platform-bot[bot]'
git config user.email '144369747+grafana-plugins-platform-bot[bot]@users.noreply.github.com'
- name: bump version
run: npm version ${INPUT_VERSION}
env:
INPUT_VERSION: ${{ github.event.inputs.version }}
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: Push latest version
run: git push origin main
- name: Push tags
run: git push origin --tags