mirror of
https://gitea.catppuccin.com/catppuccin/palette
synced 2025-02-20 05:16:52 +00:00
ci: add release-please
This commit is contained in:
parent
35bfbf6ced
commit
7523376080
44
.github/workflows/release-please.yml
vendored
Normal file
44
.github/workflows/release-please.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
name: release-please
|
||||
|
||||
jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: google-github-actions/release-please-action@v3
|
||||
with:
|
||||
release-type: node
|
||||
package-name: "@catppuccin/palette"
|
||||
- name: tag major and minor versions
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
run: |
|
||||
git config user.name github-actions[bot]
|
||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
|
||||
git tag -d v${{ steps.release.outputs.major }} || true
|
||||
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
|
||||
git push origin :v${{ steps.release.outputs.major }} || true
|
||||
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
|
||||
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
|
||||
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
|
||||
git push origin v${{ steps.release.outputs.major }}
|
||||
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
|
||||
- uses: actions/checkout@v2
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
- uses: actions/setup-node@v1
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
with:
|
||||
node-version: 18
|
||||
- run: npm ci
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
- run: npm publish
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
Loading…
Reference in New Issue
Block a user