Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Update release.yaml #12

Update release.yaml

Update release.yaml #12

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
level:
type: choice
description: "New version bump"
required: true
options:
- major
- minor
- patch
default: patch
jobs:
build:
uses: .github/workflows/build.yml@master

Check failure on line 18 in .github/workflows/release.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yaml

Invalid workflow file

invalid value workflow reference: references to workflows must be prefixed with format 'owner/repository/' or './' for local workflows
bump:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
version: ${{ steps.semver.outputs.new_version }}
steps:
- uses: actions/checkout@v4
- name: Find last version
id: get-version
run: echo "version=$(jq --raw-output '.version' plugin.json)" >> $GITHUB_OUTPUT
- uses: actions-ecosystem/action-bump-semver@v1
id: semver
with:
current_version: ${{ steps.get-version.outputs.version }}
level: ${{ github.event.inputs.level }}
- name: Bump plugin.json version
run: |
jq --rawfile readme README.md '.version = "${{ steps.semver.outputs.new_version }}" | .longdescription = $readme' plugin.json > plugin.json.tmp
mv plugin.json.tmp plugin.json
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: master
commit_message: Bump version to ${{ steps.semver.outputs.new_version }}
tagging_message: "v${{ steps.semver.outputs.new_version }}"
release:
runs-on: ubuntu-latest
needs:
- bump
- build
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "*"
artifactErrorsFailBuild: true
tag: "${{ needs.bump.outputs.version }}"