-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (32 loc) · 1.01 KB
/
release.yaml
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
name: Release
on:
workflow_dispatch:
inputs:
version:
type: string
description: The version you intend to release (eg x.y.z)
env:
VERSION: v${{ github.event.inputs.version }}
jobs:
tag:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.version != '' }}
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@0914d50df753bbc42180d982a6550f195390069f
with:
app_id: 257261
private_key: ${{ secrets.TOKEN_EXCHANGE_GH_APP_PRIVATE_KEY }}
permissions: >-
{"contents": "write"}
- name: Checkout repository code
uses: actions/checkout@v3
with:
token: ${{ steps.generate_token.outputs.token }}
fetch-depth: 0
- name: Tag Release
run: |
git config --global user.password ${{ steps.generate_token.outputs.token }}
git tag ${{env.VERSION}}
git push origin ${{env.VERSION}}