forked from myoung34/docker-github-actions-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.67 KB
/
update-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
name: "RELEASE update"
run-name: "Update release ${{ github.ref_name }} by ${{ github.event_name }}"
on:
release:
types: [released]
workflow_dispatch:
inputs:
TAG_NAME:
description: 'Tag name that the major tag will point to'
required: true
permissions:
contents: write
packages: write
env:
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
jobs:
create-release:
#if: ${{ format('refs/tags/{0}', github.REF) && contains(github.REF, github.REF_NAME) }}
name: Update release
runs-on: ubuntu-latest
defaults:
run:
shell: bash
outputs:
outvar: ${{ steps.last.outputs.RELEASE_VERSION }}
steps:
-
name: Checkout code
uses: actions/checkout@v4
# -
# name: Set version by default
# run: |
# echo "RELEASE_VERSION=${{ vars.GH_RUNNER_VERSION }}" >> $GITHUB_ENV
# -
# name: Set release version
# run: |
# if [[ ${{ github.REF }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# echo "RELEASE_VERSION=${{ github.REF_NAME }}" >> $GITHUB_ENV
# fi
# echo "PUBLISH_RELEASE=1" >> $GITHUB_ENV
# echo "::notice::New RELEASE is publishing!"
-
name: Update release
id: update-release
uses: softprops/action-gh-release@v2
# if: ${{ env.PUBLISH_RELEASE == 1 }}
with:
tag_name: ${{ env.TAG_NAME }}
name: Release ${{ env.TAG_NAME }}
repository: ${{ github.REPOSITORY }}
token: ${{ secrets.GITHUB_TOKEN }}
generate_release_notes: true
#target_commitish: ${{ github.SHA }}
draft: false
prerelease: false
append_body: true
#EOF