Skip to content

Bump plugin version #16

Bump plugin version

Bump plugin version #16

Workflow file for this run

name: Draft Release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
base-ref:
type: string
default: ""
jobs:
draft-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize version
shell: bash
run: |
echo "VERSION=$( (git describe --tags --exact-match HEAD || git rev-parse --short HEAD) | sed 's/\(.*\)-\(.*\)/\1.\2/g' )" >> "$GITHUB_ENV"
- name: Create artifact
shell: bash
run: |
mkdir out/
git archive --output="out/inventory-manager_${VERSION}.zip" ${{ github.ref }}
- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@v4.3.1
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
base-ref: ${{ inputs.base-ref }}
- name: Draft Release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref }}
name: ${{ env.VERSION }}
body: ${{ steps.changelog.outputs.changelog }}
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
artifacts: "out/inventory-manager_${{ env.VERSION }}.zip"