Skip to content

Workflow file for this run

name: "Samply.Lens Github Workflow"
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- run: npm ci
- name: "Build @samply/lens-core"
run: npm run build:lib @samply/lens-core
- name: "Build @samply/lens-components"
run: npm run build:lib @samply/lens-components
- name: "Build @samply/lens-auth"
run: npm run build:lib @samply/lens-auth
- name: "Publish @samply/lens-core"
run: cd dist/samply/lens-core && npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: "Publish @samply/lens-components"
run: cd dist/samply/lens-components && npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: "Publish @samply/lens-auth"
run: cd dist/samply/lens-auth && npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
release:
needs: build-and-publish
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- name: Create Release
uses: ncipollo/release-action@v1.12.0
with:
allowUpdates: true
draft: false
makeLatest: true
name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}
token: ${{ github.token }}
- name: Commit CHANGELOG.md
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
commit_message: 'docs: added changelog for ${{ github.ref_name }} [skip ci]'
file_pattern: CHANGELOG.md
- name: Sync Develop
run: |
git checkout main;
git checkout --track origin/develop;
git merge --ff-only main;
git push;