Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add CD workflow #1706

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CD

concurrency: production

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
version:
type: choice
required: true
description: Version
options:
- conventional
- patch
- minor
- major
- prerelease
prerelease:
type: choice
required: false
description: Pre-release
options:
-
- canary
- beta

jobs:
deploy:
runs-on: ubuntu-latest
environment: production
permissions:
contents: write
id-token: write

env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: actions/setup-node@v3
with:
# this line is required for the setup-node action to be able to run the npm publish below.
registry-url: 'https://registry.npmjs.org'
- uses: fregante/setup-git-user@v1
- run: npm ci
- run: npm run lint
- run: npm run test:coverage
- run: npm run build:lib
- run: npm run build:demo
- run: npm run build:dist
- run: npm run build:standalone
- run: npx --yes wet-run@0.5.1 release ${{ inputs.version }} --prerelease "${{ inputs.prerelease }}" --provenance --changelog --github-release