chore: update deps #23
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| branches: [dev, prod] | |
| concurrency: | |
| group: release-${{ github.ref_name }} | |
| cancel-in-progress: false | |
| jobs: | |
| beta: | |
| name: Beta Release | |
| if: github.ref == 'refs/heads/dev' && github.repository_owner == 'SkyCryptWebsite' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm fetch && pnpm install --frozen-lockfile | |
| env: | |
| HUSKY: "0" | |
| - name: Enter pre-release mode | |
| run: pnpm changeset pre enter beta 2>/dev/null || true | |
| - name: Create Release Pull Request | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm changeset:version | |
| title: "Version Packages" | |
| commit: "chore: version packages (beta)" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | |
| - name: Create Beta GitHub Release | |
| if: steps.changesets.outputs.hasChangesets == 'false' | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| if ! echo "$VERSION" | grep -q "beta"; then | |
| echo "Current version ($VERSION) is not a beta, skipping" | |
| exit 0 | |
| fi | |
| TAG="v${VERSION}" | |
| if git rev-parse "$TAG" >/dev/null 2>&1; then | |
| echo "Tag $TAG already exists, skipping" | |
| exit 0 | |
| fi | |
| git tag "$TAG" | |
| git push origin "$TAG" | |
| gh release create "$TAG" --title "$TAG" --generate-notes --prerelease | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | |
| stable: | |
| name: Stable Release | |
| if: github.ref == 'refs/heads/prod' && github.repository_owner == 'SkyCryptWebsite' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.PAT_TOKEN }} | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm fetch && pnpm install --frozen-lockfile | |
| env: | |
| HUSKY: "0" | |
| - name: Create Release Pull Request | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm changeset pre exit && pnpm changeset:version | |
| title: "Version Packages (Stable)" | |
| commit: "chore: version packages" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | |
| - name: Create Stable GitHub Release | |
| if: steps.changesets.outputs.hasChangesets == 'false' | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| if echo "$VERSION" | grep -q "beta"; then | |
| echo "Current version ($VERSION) is still a beta, skipping" | |
| exit 0 | |
| fi | |
| TAG="v${VERSION}" | |
| if git rev-parse "$TAG" >/dev/null 2>&1; then | |
| echo "Tag $TAG already exists, skipping" | |
| exit 0 | |
| fi | |
| git tag "$TAG" | |
| git push origin "$TAG" | |
| gh release create "$TAG" --title "$TAG" --generate-notes --latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} |