-
Notifications
You must be signed in to change notification settings - Fork 55
78 lines (72 loc) · 2.43 KB
/
update-release-draft.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
name: Update Release Draft
on:
workflow_dispatch:
workflow_call:
permissions:
actions: read
contents: write
jobs:
update-release-draft:
name: Update Release Draft
runs-on: ubuntu-latest
steps:
- name: Find Release Draft
uses: actions/github-script@v7
id: find-release-draft
with:
script: |
const response = await github.rest.repos.listReleases({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 1,
});
const release = response.data[0];
if (!release.draft) {
core.setFailed('Found Release is not a draft!');
return;
}
return release.id;
- name: Find FicsIt-Networks Binary
uses: actions/github-script@v7
id: find-ficsit-networks
with:
script: |
const response = await github.rest.actions.listArtifactsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 1,
name: "FicsItNetworks"
});
return response.data.artifacts[0].workflow_run.id;
- name: Find FicsIt-Networks-Merged Binary
uses: actions/github-script@v7
id: find-ficsit-networks-merged
with:
script: |
const response = await github.rest.actions.listArtifactsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 1,
name: "FicsItNetworks-Merged"
});
return response.data.artifacts[0].workflow_run.id;
- name: Download FicsIt-Networks
uses: actions/download-artifact@v4
with:
name: FicsItNetworks
run-id: ${{ steps.find-ficsit-networks.outputs.result }}
path: ${{ github.workspace }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Download FicsIt-Networks
uses: actions/download-artifact@v4
with:
name: FicsItNetworks-Merged
run-id: ${{ steps.find-ficsit-networks-merged.outputs.result }}
path: ${{ github.workspace }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload To Github Release
uses: xresloader/[email protected]
with:
file: "*.zip"
overwrite: true
release_id: ${{ steps.find-release-draft.outputs.result }}