-
Notifications
You must be signed in to change notification settings - Fork 37
61 lines (53 loc) · 1.58 KB
/
nightly_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
# This workflow runs on every commit on the master branch. It runs the test suite
# and packages the add-on. It then updates the "nightly release" in the release section
# of the repository.
name: Nightly Release
# Triggers the workflow on pushes on the master branch
on:
push:
branches: [master]
# Workflow steps
jobs:
tests:
uses: ./.github/workflows/test.yml
package:
name: "Package Release"
needs: [tests]
runs-on: "ubuntu-latest"
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
- name: Create package
run: python release/package.py
- name: Advance `latest` tag
uses: actions/github-script@v6
with:
script: |
try {
await github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "tags/latest"
})
} catch (e) {
console.log("The latest tag doesn't exist yet: " + e)
}
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/latest",
sha: context.sha
})
- name: Create GitHub nightly release
uses: ncipollo/release-action@v1
with:
name: "Nightly Release"
prerelease: true
allowUpdates: true
replacesArtifacts: true
artifacts: "mitsuba-blender.zip"
artifactErrorsFailBuild: true
tag: "latest"
bodyFile: "release/nightly_release_body.md"