2024-07-17 15:23:16 -04:00
|
|
|
# This workflow will create a GitHub release every time a tag is pushed
|
2024-07-17 16:02:16 -04:00
|
|
|
name: Deploy CDN WebComponents
|
2024-07-17 15:23:16 -04:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-07-17 15:45:55 -04:00
|
|
|
branches:
|
|
|
|
- "master"
|
2024-07-17 15:23:16 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
2024-12-04 19:11:23 -05:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2024-07-17 15:23:16 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-07-17 15:48:50 -04:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
2024-12-04 21:17:05 -05:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2024-07-17 15:48:50 -04:00
|
|
|
|
2024-12-04 21:23:36 -05:00
|
|
|
- uses: oven-sh/setup-bun@v2
|
|
|
|
with:
|
|
|
|
bun-version: latest
|
|
|
|
|
2024-12-04 19:12:58 -05:00
|
|
|
- name: Setup Git Config
|
|
|
|
run: |
|
2024-12-04 21:23:36 -05:00
|
|
|
bun install
|
2024-12-04 19:12:58 -05:00
|
|
|
git config user.name "Prad N."
|
|
|
|
git config user.email "prad@sonr.io"
|
|
|
|
|
2024-07-17 15:48:50 -04:00
|
|
|
|
2024-12-04 21:22:05 -05:00
|
|
|
- name: Build
|
2024-12-04 21:23:36 -05:00
|
|
|
run: bun run build
|
2024-12-04 21:22:05 -05:00
|
|
|
|
2024-12-04 21:17:05 -05:00
|
|
|
- name: 'Automated Version Bump'
|
|
|
|
run: |
|
|
|
|
npm version patch
|
|
|
|
git push
|
|
|
|
git push --tags
|
2024-12-04 19:11:23 -05:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2024-07-17 15:48:50 -04:00
|
|
|
|
2024-12-04 19:11:23 -05:00
|
|
|
- uses: JS-DevTools/npm-publish@v3
|
2024-07-17 15:23:16 -04:00
|
|
|
with:
|
2024-12-04 19:11:23 -05:00
|
|
|
token: ${{ secrets.NPM_TOKEN }}
|