This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
88 lines (85 loc) · 2.56 KB
/
build-plugin.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
name: build-plugin
on:
workflow_dispatch:
inputs:
ci:
description: 'Run CI'
type: boolean
default: true
sha_short:
description: 'sha_short'
required: true
new_tag:
description: 'new_tag'
required: true
new_tag_short:
description: 'new_tag_short'
required: true
name:
description: 'name'
required: true
sha:
description: 'sha'
required: true
repository_dispatch:
types: [build-server]
jobs:
ci-plugin:
if: ${{ github.event.inputs.ci }}
uses: ./.github/workflows/ci-plugin.yml
release-nightly:
name: Release nightly/rc
runs-on: ubuntu-latest
needs: [ci-plugin]
if: ${{ !failure() && github.event.inputs.name != 'blank' }}
env:
ARTIFACT: plateau-plugin_${{ github.event.inputs.name }}.zip
steps:
- uses: actions/download-artifact@v2
with:
name: plateau-plugin
path: plateau-plugin/
- name: Zip
run: zip -r $ARTIFACT plateau-plugin/
- name: Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: ${{ env.ARTIFACT }}
artifactContentType: application/zip
commit: ${{ github.event.inputs.sha }}
name: ${{ github.event.inputs.name }}
tag: ${{ github.event.inputs.name }}
body: ${{ github.event.inputs.sha }}
prerelease: true
release:
name: Release version zip
runs-on: ubuntu-latest
needs: [ci-plugin]
if: ${{ !failure() && github.event.inputs.new_tag != 'blank' }}
env:
ARTIFACT: plateau-plugin_${{ github.event.inputs.name }}
steps:
- name: Fetch plateau-plugin release
uses: dsaltares/fetch-gh-release-asset@master
with:
version: tags/rc
file: plateau-plugin_rc.zip
token: ${{ secrets.GITHUB_TOKEN }}
- name: Rename artifact
run: mv plateau-plugin_rc.zip $ARTIFACT
- name: Download latest changelog
uses: dawidd6/action-download-artifact@v2
with:
workflow: release.yml
name: changelog-${{ github.event.inputs.new_tag }}
- name: Create GitHub release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: ${{ env.ARTIFACT }}
artifactContentType: application/zip
commit: ${{ github.event.inputs.sha }}
name: ${{ github.event.inputs.new_tag }}
tag: ${{ github.event.inputs.new_tag }}
bodyFile: CHANGELOG_latest.md