Merge pull request #260 from SkyCryptWebsite/changeset-release/dev #39
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: Prepare Beta Release | |
| id: beta_prep | |
| run: node scripts/release-beta.mjs | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | |
| - name: Create Beta GitHub Release | |
| if: steps.beta_prep.outputs.release_ready == 'true' | |
| 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: Prepare Stable Release | |
| id: stable_prep | |
| run: node scripts/release-stable.mjs | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | |
| - name: Create Stable GitHub Release | |
| if: steps.stable_prep.outputs.release_ready == 'true' | |
| 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 }} |