-
Notifications
You must be signed in to change notification settings - Fork 5
75 lines (73 loc) · 2.86 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
name: release
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#on
on:
push:
tags:
- "*"
jobs:
draft_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "find env"
run: |
set | grep GITHUB_ | grep -v GITHUB_TOKEN
zip -r pkg.zip *.md
echo "$(openssl rand -hex 4)" > "random-name-$(openssl rand -hex 4).txt"
echo "$(openssl rand -hex 4)" > "random-name-$(openssl rand -hex 4).txt"
- name: Create Release
id: create_release
uses: actions/create-release@v1
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 }} (draft)
body: |
Test upload-to-github-release works with `actions/create-release`.
draft: true
prerelease: false
- uses: xresloader/upload-to-github-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "*.md;*.zip;random-name-*.txt"
delete_file: "random-name-*.txt;random-*.txt"
release_id: ${{ steps.create_release.outputs.id }}
update_release_body: ${{ github.ref }}
update_release_body_append: "true"
overwrite: true
verbose: true
prelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "find env"
run: |
set | grep GITHUB_ | grep -v GITHUB_TOKEN
zip -r pkg.zip *.md
echo "$(openssl rand -hex 4)" > "random-name-$(openssl rand -hex 4).txt"
echo "$(openssl rand -hex 4)" > "random-name-$(openssl rand -hex 4).txt"
echo 'Test upload-to-github-release works with `actions/create-release` and read body from file.' > release-body.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
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 }}-prelease
release_name: Release ${{ github.ref }} (prelease)
body: |
Test upload-to-github-release works with `actions/create-release`.
draft: false
prerelease: true
- uses: xresloader/upload-to-github-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "*.md;*.zip;random-name-*.txt"
delete_file: "random-name-*.txt;random-*.txt"
release_id: ${{ steps.create_release.outputs.id }}
update_release_body_path: release-body.md
overwrite: true
verbose: true