This repository has been archived by the owner on Mar 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (80 loc) · 2.73 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
71
72
73
74
75
76
77
78
79
80
81
82
name: Release updater
on:
release:
types: ["created"]
# workflow_run:
# workflows: ["Build"]
# branch: [main]
# tags:
# - v*
# types:
# - completed
# workflow_dispatch:
# inputs:
# tags:
# description: 'Test scenario tags'
jobs:
#Action only on release (tag starting with v)
release:
# if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: nodejs project information
id: projectinfo
uses: gregoranders/nodejs-project-info@v0.0.12
# - name: Download artifact
# uses: dawidd6/action-download-artifact@v2
# with:
# github_token: ${{secrets.GITHUB_TOKEN}}
# workflow: build.yml
# branch: main
- name: Debug Outputs
env:
OUTPUT: ${{ needs.build.outputs}}
run: echo "$OUTPUT"
- name: Changelog
uses: scottbrenner/generate-changelog-action@master
id: Changelog
env:
REPO: ${{ github.repository }}
# - name: Create Release
# id: create_release
# uses: actions/create-release@latest
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# body: |
# ${{ steps.Changelog.outputs.changelog }}
# draft: true
# prerelease: false
- name: Update GitHub Release
# You may pin to the exact commit or the version.
# uses: tubone24/update_release@a65517a60b8010e7c0aaccf80fa3b06c72df04f8
uses: tubone24/update_release@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
# new release name, if not, take over before name
#release_name: # optional
# new body text, if not, take over before text
body: |
${{ steps.Changelog.outputs.changelog }}
# new draft, if not, take over before draft
# draft: true # optional
# new prerelease, if not, take over prerelease
prerelease: true # optional
# If true, append body text, If false, overwrite body text, default is false
is_append_body: true
# Path to file with new body text.
#body_path: # optional
# - uses: xresloader/upload-to-github-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# file: "./**/*.exe;./**/*.rpm;./**/*.deb;./**/*.app;./**/*.dmg;./**/*.zip;./**/*.nupkg"
# tags: false
# draft: true