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

ci: add next tag #61

Merged
merged 12 commits into from
Apr 3, 2024
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Release to @dev tag
- name: Release to @next tag
if: steps.changesets.outputs.published != 'true'
run: |
git checkout main
pnpm changeset version --snapshot dev
pnpm changeset publish --tag dev
pnpm changeset version --snapshot next
pnpm changeset publish --tag next
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/unpublish-npm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Unpublish old versions"

on:
workflow_dispatch:
inputs:
delete_packages:
type: boolean
description: Delete packages? otherwise dry-run mode will be used
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
clean-npm-versions:
name: Unpublish versions next, preview, main...
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v3
- uses: FuelLabs/github-actions/setups/node@master
- uses: FuelLabs/github-actions/setups/npm@master
with:
npm-token: ${{ secrets.NPM_TOKEN }}
- run: |
node ./scripts/unpublish.js
env:
DELETE_PACKAGES: ${{ github.event.inputs.delete_packages }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"@xstate/cli": "^0.5.2",
"compare-versions": "6.1.0",
"dotenv": "^16.3.1",
"eslint": "^8.48.0",
"husky": "^8.0.3",
Expand Down
Loading
Loading