Skip to content

Commit

Permalink
Create create-plugin-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vrutz authored May 22, 2024
1 parent 6a45501 commit 2ec5949
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/create-plugin-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and create pre-release for the EKS cluster plugin

on:
workflow_dispatch:
inputs:
version:
description: 'Version of the release'
required: true
target:
description: 'Commit hash or branch to release (optional, defaults to master)'
required: false

jobs:
build-and-release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ inputs.target || 'master' }}

- name: Check for make
run: make --version

- name: Run Makefile
run: make plugin

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ inputs.version }}"
release_name: "v${{ inputs.version }}"
target_commitish: ${{ inputs.target || 'master' }}
body: |
This is a pre-release for version of the DSS EKS plugin ${{ inputs.version }}.
Please modify the following release notes in this description prior to release.
draft: true
prerelease: true
generate_release_notes: true

- name: Upload Release Assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /dist/dss-plugin-eks-clusters-${{input.version}}.zip"
asset_name: "dss-plugin-eks-clusters-${{input.version}}"
asset_content_type: application/zip
- name: Archive release assets
run: rm -rf /dist

0 comments on commit 2ec5949

Please sign in to comment.