Build and create pre-release for the EKS cluster plugin #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
sudo apt-get install -y wget | |
- 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 |