A GitHub action to publish release drafts on GitHub.
This task searches for a release draft with a given tag name. If the draft is found, the task attaches the tag (if it exists) to this release, then publishes the release.
The action requires GitHub token for authentication.
Here is an example of a workflow using action-publish-release-drafts
:
name: Deploy
on:
push:
tags:
- 'v*.*.*'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Get version from ref
id: get-version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Publish release on GitHub
uses: test-room-7/action-publish-release-drafts@v0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
tag-name: ${{ steps.get-version.outputs.VERSION }}
- Create a new draft reserved for a new version, and name it in a semver format, e.g.
v0.1.0
. - Update a description of the draft during development, if neccessary.
- When a new version is ready, push the tag to repository (
v0.1.0
in this case). - The action will be executed, and it will apply the
v0.1.0
tag to the draft, and will publish it.
github-token
: GitHub tokentag-name
: Tag name
# Install dependencies
> npm install
# Build the action
> npm run dist
# Lint project files
> npm run lint
Don't push dist files; they're updated automatically.
Licensed under the MIT License.