-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (54 loc) · 1.9 KB
/
create-plugin-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
62
name: Build and create pre-release for the EKS cluster plugin
on:
workflow_dispatch:
inputs:
target:
description: 'Commit hash or branch to release (optional, defaults to the current branch)'
required: false
skip_linter:
description: 'Skip the linter? (use true to skip)'
required: false
default: 'false'
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.target || github.ref }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y make
sudo apt-get install -y jq
- uses: chartboost/ruff-action@v1
if: ${{ inputs.skip_linter != 'true' || inputs.skip_linter != 'True' || inputs.skip_linter != 'TRUE' }}
- name: Retrieve plugin info
id: plugin_info
run: |
id=$(jq -r '.id' plugin.json)
version=$(jq -r '.version' plugin.json)
echo "Creating release for plugin '$id' and version '$version'"
echo "id=$id" >> $GITHUB_OUTPUT
echo "version=$version" >> $GITHUB_OUTPUT
- name: Compile plugin into archive
run: make plugin
- name: Create GitHub pre-release and include the plugin archive as asset
uses: ncipollo/release-action@v1
with:
tag: "v${{ steps.plugin_info.outputs.version }}"
commit: ${{ inputs.target || github.ref }}
artifacts: "./dist/dss-plugin-${{ steps.plugin_info.outputs.id }}-${{ steps.plugin_info.outputs.version }}.zip"
artifactContentType: application/zip
token: ${{ secrets.GITHUB_TOKEN }}
makeLatest: false
prerelease: true
draft: true
generateReleaseNotes: true
allowUpdates: true
updateOnlyUnreleased: true
artifactErrorsFailBuild: true
replacesArtifacts: true