convert wetty from submodule to normal directory
This commit is contained in:
60
wetty/.github/workflows/publish.yml
vendored
Normal file
60
wetty/.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
---
|
||||
name: Build and Publish
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
test:
|
||||
name: Build & Test
|
||||
uses: ./.github/workflows/build-and-test.workflow.yml
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- name: Setup env
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 22
|
||||
cache: 'pnpm'
|
||||
|
||||
- uses: actions/cache@v3
|
||||
id: restore-build
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
|
||||
# Publish to NPM
|
||||
- name: Publish if version has been updated
|
||||
uses: pascalgn/npm-publish-action@1.3.9
|
||||
with:
|
||||
tag_name: 'v%s'
|
||||
tag_message: 'v%s'
|
||||
commit_pattern: "^Release (\\S+)"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_AUTH_TOKEN: ${{ secrets.npm_token }}
|
||||
|
||||
# Publish to Github PKG
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 22
|
||||
registry-url: 'https://npm.pkg.github.com'
|
||||
|
||||
- name: Publish to Github PKG if version has been updated
|
||||
uses: pascalgn/npm-publish-action@1.3.9
|
||||
with:
|
||||
create_tag: false
|
||||
commit_pattern: "^Release (\\S+)"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user