x-markdown-css/.github/workflows/release.yml

40 lines
846 B
YAML
Raw Normal View History

2023-02-28 10:43:04 +00:00
name: Build and Release
2023-02-28 10:35:20 +00:00
on:
push:
tags:
- 'v*'
jobs:
# NPM Registry Release
release:
# Use Ubuntu 22.04
runs-on: ubuntu-22.04
steps:
# Step I
- name: Get Source Code
uses: actions/checkout@v3
with:
fetch-depth: 0
# Step II
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
# Step III
2023-02-28 10:43:04 +00:00
- name: Install Dependencies
run: npm ci
# Step IV
2023-02-28 10:43:04 +00:00
- name: Build Project
run: npm run build
# Step V
2023-02-28 10:35:20 +00:00
- name: Publish to NPM Registry
2023-02-28 10:50:32 +00:00
uses: JS-DevTools/npm-publish@v1
2023-02-28 10:55:04 +00:00
with:
token: ${{ secrets.NPM_TOKEN }}
# Step VI
- name: Generate Changelog
run: npx changelogithub@0.12
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}