-
Notifications
You must be signed in to change notification settings - Fork 86
151 lines (133 loc) · 4.91 KB
/
build_devrelease.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: build_devrelease
on:
workflow_dispatch:
jobs:
version_check:
runs-on: ubuntu-20.04
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
steps:
- id: latest_package
continue-on-error: true
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: HDR-Development/HDR-DevReleases
token: ${{ secrets.RELEASE_TOKEN }}
# fail out if there's already a release for this commit
- name: ensure one build per sha
if: ${{ contains(steps.latest_package.outputs.description, github.sha) }}
run: exit 1
plugin_build:
env:
PLUGIN_NAME: hdr
runs-on: ubuntu-20.04
needs: version_check
container:
image: wuboyth/skyline-plugin-builder:latest
steps:
# - name: Free Disk Space (Ubuntu)
# uses: jlumbroso/[email protected]
# - name: setup python
# uses: actions/[email protected]
# with:
# python-version: '3.9' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: checkout version
uses: actions/[email protected]
# get the most recent latest full release
- id: package_latest
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: HDR-Development/HDR-DevReleases
token: ${{ secrets.RELEASE_TOKEN }}
excludes: prerelease, draft
- uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ steps.package_latest.outputs.release }}
level: patch
# build the project
- run: |
cd scripts && NO_RUST_NIGHTLY=1 python3 make_dist.py build version=${{ steps.bump-semver.outputs.new_version }} name=hdr-private && cd ..
du -sh *
rm -rf target
du -sh *
env:
HOME: /root
- id: romfs_version
uses: pozetroninc/github-action-get-latest-release@master
with:
token: ${{ secrets.RELEASE_TOKEN }}
repository: HDR-Development/romfs-release
- name: Download romfs
id: get_romfs
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDR-Development/romfs-release'
version: 'tags/${{ steps.romfs_version.outputs.release }}'
file: 'romfs.zip'
token: ${{ secrets.RELEASE_TOKEN }}
- name: make package
run: |
python3 scripts/full_package.py devrelease none
- name: Download latest switch package
id: get_old_switch_package
if: steps.package_latest.outcome != 'failure'
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDR-Development/HDR-DevReleases'
version: 'tags/${{ steps.package_latest.outputs.release }}'
file: 'switch-package.zip'
token: ${{ secrets.RELEASE_TOKEN }}
# build the upgrade.zip and deletions.json
- name: make upgrade artifacts
if: steps.package_latest.outcome != 'failure'
run: |
python3 scripts/make_diff.py devrelease
- name: show upgrade artifacts
if: steps.package_latest.outcome != 'failure'
run: |
ls && stat * && echo && ls upgrade_artifacts && stat upgrade_artifacts/*
# upload the upgrade data to the previous release for auto updater
- name: Upload upgrade data to previous release
if: steps.package_latest.outcome != 'failure'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.RELEASE_TOKEN }}
file: upgrade_artifacts/upgrade.zip
prerelease: true
make_latest: false
file_glob: true
asset_name: upgrade
repo_name: HDR-Development/HDR-DevReleases
tag: ${{ steps.package_latest.outputs.release }}
overwrite: true
# upload the upgrade deletions to the previous release for auto updater
- name: Upload upgrade deletions to previous release
if: steps.package_latest.outcome != 'failure'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.RELEASE_TOKEN }}
file: upgrade_artifacts/deletions.json
prerelease: true
make_latest: false
file_glob: true
asset_name: deletions
repo_name: HDR-Development/HDR-DevReleases
tag: ${{ steps.package_latest.outputs.release }}
overwrite: true
- name: Display structure of downloaded version
run: ls -R && cp hdr_version.txt artifacts
- name: Upload full package to devreleases
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.RELEASE_TOKEN }}
file: artifacts/*
prerelease: false
make_latest: true
file_glob: true
asset_name: artifacts
repo_name: HDR-Development/HDR-DevReleases
release_name: ${{ steps.bump-semver.outputs.new_version }}
tag: ${{ steps.bump-semver.outputs.new_version }}
body: Built from commit ${{ github.sha }}
overwrite: true