Skip to content

Commit

Permalink
ci: correct release configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
thijsdaniels committed Nov 28, 2023
1 parent ca20792 commit 482e73f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 40 deletions.
46 changes: 7 additions & 39 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,6 @@ on:
- main

jobs:
version:
name: Version Packages
if: "github.event.commit.message != 'chore: publish'"
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install Deoendencies
run: |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
npm ci
- name: Commit Release
uses: changesets/action@v1
with:
commit: "chore: release"
publish: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

deploy:
name: Deploy Apps
if: "github.event.commit.message != 'chore: publish'"
Expand All @@ -47,10 +19,10 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: npm

- name: Install Deoendencies
- name: Install Dependencies
run: |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
npm ci
Expand All @@ -67,9 +39,9 @@ jobs:
export NODE_OPTIONS="--max_old_space_size=4096"
npm run deploy
publish:
version:
name: Publish Packages
if: "github.event.commit.message == 'chore: publish'"
if: "github.event.commit.message != 'chore: publish'"
runs-on: ubuntu-latest

steps:
Expand All @@ -79,21 +51,17 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Install Dependencies
run: |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
npm ci
- name: Build Packages
run: |
npm run build:packages
- name: Publish Packages
- name: Version or Publish
uses: changesets/action@v1
with:
commit: false
commit: "chore: publish"
publish: npm run publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"build:packages": "turbo run build --filter=@codedazur/*",
"deploy": "turbo run deploy --filter=@apps/infrastructure",
"destroy": "turbo run destroy --filter=@apps/infrastructure",
"version": "changeset version",
"pre:publish": "npm run build:packages",
"publish": "changeset publish"
},
"devDependencies": {
Expand Down

0 comments on commit 482e73f

Please sign in to comment.