Merge branch 'master' of https://github.com/chadhutchins182/oas3-tools #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creates a release from a tagged commit | |
name: Create Release | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set RELEASE_VERSION | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Test RELEASE_VERSION | |
run: | | |
echo $RELEASE_VERSION | |
echo ${{ env.RELEASE_VERSION }} | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "17.x" | |
registry-url: "https://npm.pkg.github.com" | |
- run: npm ci | |
- run: npm run build | |
- run: npm publish | |
env: | |
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Changelog | |
id: github_release | |
uses: mikepenz/release-changelog-builder-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: ${{steps.github_release.outputs.changelog}} | |
draft: false | |
prerelease: false |