chore: release v0.7.3 #62
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
tags: | |
- "**" | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: "npm" | |
node-version: 20.10.0 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Docs | |
run: npm run generate:docs | |
- uses: actions/upload-artifact@v3 | |
if: success() | |
with: | |
name: latest | |
path: dist | |
publish: | |
name: Publish | |
needs: build | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: "npm" | |
node-version: 20.10.0 | |
registry-url: https://registry.npmjs.org/ | |
- uses: actions/download-artifact@v3 | |
with: | |
name: latest | |
path: dist | |
- name: Configure git | |
run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: Configure npm | |
run: npm config set //registry.npmjs.org/:_authToken ${{secrets.WCP_NPM_TOKEN}} | |
- name: Publish package | |
run: npx release-it --no-git --no-github.release --no-increment --ci | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
NODE_AUTH_TOKEN: ${{secrets.WCP_NPM_TOKEN}} | |
deploy: | |
name: Deploy | |
needs: build | |
environment: | |
name: Preview | |
url: https://webcomponents-preview.github.io/client/latest/ | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: deploy | |
token: ${{secrets.WCP_GITHUB_TOKEN}} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: latest | |
path: .tmp | |
- name: Configure git | |
run: | | |
git config user.name "autoreleaser" | |
git config user.email "release@enke.dev" | |
- name: Update latest | |
run: | | |
rm -rf latest | |
mv .tmp latest | |
git add . | |
git commit --allow-empty --message $GITHUB_SHA | |
git push |