Skip to content

Commit

Permalink
Add Release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
reinerBa committed Jan 13, 2024
1 parent 4eb086d commit 01fbb4b
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Add Github Release Tag

on:
push:
tags:
- v*.*.*

jobs:
release:
if: github.repository == 'reinerBa/vite-plugin-mock-simple'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build

- name: restore example2
working-directory: ./example2
run: npm ci

- name: runtime and api test example2
working-directory: ./example2
run: npm run runtest

- run: npm pack
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
uses: mikepenz/[email protected]
with:
body: ${{steps.github_release.outputs.changelog}}

0 comments on commit 01fbb4b

Please sign in to comment.