Repository navigation
36 lines (36 loc) · 1.57 KB
/
Copy pathrelease.yml
File metadata and controls
36 lines (36 loc) · 1.57 KB
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
# Releases vX.Y.Z: tags it and publishes a GitHub Release with git-cliff notes, then tells the
# marketplace (when MARKETPLACE_APP_CLIENT_ID and MARKETPLACE_APP_PRIVATE_KEY are set). Started by
# a pushed "chore(release): vX.Y.Z" commit, by hand (Run workflow) or by a pushed vX.Y.Z tag.
# Generated from plugin.config.json by scripts/build.ts; don't edit by hand. The steps live in the
# CI repo named by `ci.repo` (reusable workflow, called at `ci.ref`); see AGENTS.md.
name: release
on:
push:
branches: [main]
tags: ['v[0-9]+.[0-9]+.[0-9]+']
workflow_dispatch:
inputs:
bump:
description: Which part of the version to raise
type: choice
options: [patch, minor, major]
default: patch
version:
description: Or the exact version to release (X.Y.Z); wins over bump
required: false
type: string
permissions: {}
jobs:
release:
# On a push to main, only a release commit starts a release; other pushes show as skipped.
if: "${{ github.event_name != 'push' || github.ref_type == 'tag' || startsWith(github.event.head_commit.message, 'chore(release): v') }}"
permissions:
contents: write # the release commit, the tag and the GitHub Release
actions: write # to start check.yml on the release commit of a manual run
uses: rjstone/plugin-marketplace/.github/workflows/plugin-release.yml@main
with:
bump: ${{ inputs.bump }}
version: ${{ inputs.version }}
client-id: ${{ vars.MARKETPLACE_APP_CLIENT_ID }}
secrets:
private-key: ${{ secrets.MARKETPLACE_APP_PRIVATE_KEY }}