Skip to content

Merge pull request #286 from NVE/feature/semantic-release3 #144

Merge pull request #286 from NVE/feature/semantic-release3

Merge pull request #286 from NVE/feature/semantic-release3 #144

Workflow file for this run

# .github/workflows/build-and-release.yml
name: Build and Release for Test 2
on:
push:
branches:
- test-release
paths:
- 'src/**'
- 'build/**'
- 'public/css/**'
workflow_dispatch:
jobs:
build_and_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Semantic Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH }}
- name: Configure Git for npm version
if: ${{ steps.semantic-release.outputs.new-release-published == 'true' }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "Designsystem"
- name: Push tags and changes
if: ${{ steps.semantic-release.outputs.new-release-published == 'true' }}
run: git push --follow-tags