forked from FredKSchott/snowpack
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.2 KB
/
release.yml
File metadata and controls
39 lines (34 loc) · 1.2 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
37
38
39
# Inspired by https://bret.io/projects/package-automation/
name: Create Release
on:
workflow_dispatch:
inputs:
tag:
description: 'what kind of release? (ex: "next", "latest")'
required: true
packagePath:
description: 'path to package? (ex: "snowpack", "plugins/plugin-babel")'
required: true
env:
node_version: 14
jobs:
version_and_release:
runs-on: ubuntu-latest
steps:
# SETUP:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ env.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.node_version }}
# (REQUIRED) setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token.
registry-url: 'https://registry.npmjs.org'
- run: git config --global user.email "github-ci@snowpack.dev"
- run: git config --global user.name " ${{ github.actor }}"
- run: yarn --frozen-lockfile
# PUBLISH:
- run: node -e "require('./scripts/release.cjs')('${{ github.event.inputs.packagePath }}', '${{ github.event.inputs.tag }}')"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}