Releases: JasonEtco/build-and-tag-action
v2.0.1
Just updates some bits, including the underlying Node version for the Action.
v2.0.0
v1.2.0
v1.1.4
Updates some dependencies, nothing special!
v1.1.3
Updates some dependencies, nothing special!
v1.1.2
v1.1.1
Adds more logging to the output!
v1.1.0
Adds support for the tag_name
input, which will let this action support multiple events instead of just release
!
v1.0.0
A GitHub Action for publishing JavaScript Actions! It's designed to act on new releases, and updates the tag with a compiled JS file, using @zeit/ncc
. The process looks like this:
- Runs the
setup
input (default:npm ci && npm run build
) - Reads the
main
property in yourpackage.json
- Force pushes
action.yml
and the above file to the release's tag - Force pushes to the major version tag (ex:
v1.0.0
->v1
)
This repository even uses it! @zeit/ncc
supports TypeScript out of the box 😍
Usage
name: Publish
on:
release:
types: [published, edited]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.release.tag_name }}
- uses: JasonEtco/build-and-tag-action@v1
env:
GITHUB_TOKEN: ${{ github.token }}
Options
setup
You can customize the setup
script that's run before pushing the files to the tag.
- uses: JasonEtco/build-and-tag-action@v1
with:
setup: 'npm ci && npm run super-build'
env:
GITHUB_TOKEN: ${{ github.token }}
Motivation
The guide to JavaScript Actions recommends including node_modules
in your repository, and manual steps to following the versioning recommendations. There are anti-patterns there that just don't sit right with me; so we can enable the same workflow, automatically!
This Action is heavily inspired by mheap/github-action-auto-compile-node & Actions-R-Us/actions-tagger. This is more or less a combination of those two Actions, meant to work together.