Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .github/actions/set-npm-token/action.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/actions/yarn/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ runs:
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: .nvmrc
registry-url: 'https://registry.npmjs.org'
- name: Enable Corepack and prepare Yarn 4
run: corepack enable
shell: bash
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/deploy-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ jobs:
id: setup
uses: ./.github/actions/yarn

- name: Add NPM auth token file
uses: ./.github/actions/set-npm-token
with:
token-secret: ${{ secrets.NPM_TOKEN }}

- name: Ensure workflow is associated with a pull request
uses: ./.github/actions/validate-pr-context

Expand Down
67 changes: 0 additions & 67 deletions .github/workflows/publish-production.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
name: Publish Alpha
name: Publish

on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main

env:
NODE_VERSION: '22.13.1'
NODE_OPTIONS: '--max_old_space_size=8196'
NX_CLOUD: false
IGNORE_COMMIT_MESSAGE: 'chore(release): publish'

permissions:
id-token: write
contents: read
pull-requests: write
issues: write
actions: write

jobs:
publish-alpha:
if: github.event_name == 'pull_request'
runs-on: ubuntu-22.04
concurrency:
group: publish-alpha-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
pull-requests: write
issues: write
actions: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Setup and Build
id: setup
Expand All @@ -33,11 +39,6 @@ jobs:
- name: Set git user
uses: ./.github/actions/set-git-user

- name: Set npm token
uses: ./.github/actions/set-npm-token
with:
token-secret: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Ensure workflow is associated with a pull request
uses: ./.github/actions/validate-pr-context

Expand All @@ -56,7 +57,6 @@ jobs:
npx nx run gamut-release:alpha --preid="${PREID}" --manifest
env:
GH_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: List alpha packages versions
id: published
Expand Down Expand Up @@ -108,3 +108,50 @@ jobs:
github-token: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
header: Alpha Packages
message-path: alpha-publish-comment.md

publish-production:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-22.04
timeout-minutes: 30
concurrency:
group: publish-production
cancel-in-progress: false
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }}

- name: Skip build from automated commit
uses: ./.github/actions/skip-automated-commits
with:
ignore-commit-message: ${{ env.IGNORE_COMMIT_MESSAGE }}

- name: Setup and Build
uses: ./.github/actions/yarn

- name: Cache Nx
uses: actions/cache@v4
with:
path: node_modules/.cache/nx
key: nx-${{ runner.os }}-${{ hashFiles('yarn.lock') }}-${{ github.ref_name }}-${{ github.run_id }}
restore-keys: |
nx-${{ runner.os }}-${{ hashFiles('yarn.lock') }}-${{ github.ref_name }}-
nx-${{ runner.os }}-${{ hashFiles('yarn.lock') }}-
nx-${{ runner.os }}-

- name: Set git user
uses: ./.github/actions/set-git-user

- name: Build All Packages
run: yarn build

- name: NX Release
run: npx nx release -y
env:
GH_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
Loading