-
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (69 loc) · 2.86 KB
/
Copy pathcreate-release.yml
File metadata and controls
85 lines (69 loc) · 2.86 KB
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
83
84
85
name: Create Release
on:
workflow_dispatch: # allow manual run
push:
branches:
- main
permissions:
contents: write
issues: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release: ${{ steps.release.outputs }}
release--tag_name: ${{ steps.release.outputs.tag_name }}
release--release_created: ${{ steps.release.outputs.release_created }}
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Starting log
run: |
echo "🐧 This job is running on a ${{ runner.os }} server hosted by GitHub!"
echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
echo "📰 This job is triggered by this event: ${{ github.event_name }}"
- name: Run Release Please
id: release
uses: googleapis/release-please-action@v4
with:
release-type: simple
token: ${{ secrets.GITHUB_TOKEN }}
# optional. customize path to release-please-config.json
config-file: Repo/release-please-config.json
# optional. customize path to .release-please-manifest.json
manifest-file: Repo/release-please-manifest.json
- name: Print release outputs for debugging
run: |
echo "Release outputs:"
echo "${{ toJson(steps.release.outputs) }}"
- name: Status
run: echo "🍏 This job's status is ${{ job.status }}."
release-zip:
if: ${{ needs.release-please.outputs.release--release_created }}
runs-on: ubuntu-latest
needs: release-please
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Starting log
run: |
echo "🐧 This job is running on a ${{ runner.os }} server hosted by GitHub!"
echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
echo "📰 This job is triggered by this event: ${{ github.event_name }}"
- name: Print release outputs for debugging
run: |
echo "Release outputs:"
echo "${{ toJson(needs.release-please.outputs.release) }}"
- name: Create ZIP archive
run: |
zip -r release.zip *.ps1 *.rmskin 2>/dev/null || true
- name: Upload ZIP to Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ needs.release-please.outputs.release--tag_name }} ./release.zip --clobber
mv release.zip LivelyWallpaperRandom-${{ needs.release-please.outputs.release--tag_name }}.zip
gh release upload ${{ needs.release-please.outputs.release--tag_name }} ./LivelyWallpaperRandom-${{ needs.release-please.outputs.release--tag_name }}.zip --clobber
- name: Status
run: echo "🍏 This job's status is ${{ job.status }}."