Skip to content

Resolves request: Add option to parse lastmod and changefreq and prio… #37

Resolves request: Add option to parse lastmod and changefreq and prio…

Resolves request: Add option to parse lastmod and changefreq and prio… #37

Workflow file for this run

name: Bump and release NPM Version
on:
push:
branches:
- master
# file paths to consider in the event. Optional; defaults to all.
paths-ignore:
- 'package.json'
- 'package-lock.json'
jobs:
build:
runs-on: ubuntu-latest
outputs:
nodeVersion: ${{ steps.bump_version.outputs.version }}
strategy:
matrix:
node-version: [10.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: bump version
id: bump_version
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
echo "::set-output name=version::$(echo $(node -p "require('./package.json').version.trim()"))"
npm version patch
git push
release:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
node-version: [10.x]
steps:
- name: draft release
id: draft_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ needs.build.outputs.nodeVersion }}
release_name: Release ${{ needs.build.outputs.nodeVersion }}
body: |
Releasing version ${{ needs.build.outputs.nodeVersion }} to NPM
draft: true
prerelease: false