Skip to content

Commit

Permalink
fix: Update release action
Browse files Browse the repository at this point in the history
  • Loading branch information
RayRedGoose committed Sep 27, 2023
1 parent 5eb7cc9 commit fb14a7c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
7 changes: 2 additions & 5 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"updateInternalDependencies": "patch"
}
27 changes: 9 additions & 18 deletions .github/workflows/release-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ jobs:
- name: See git log
run: |
git log --no-walk --tags --oneline -n 1
- name: Build
run: npm run build:tokens
# Push both the commit and tag created by changeset version command using a PAT
- name: Push changes
Expand All @@ -109,18 +106,6 @@ jobs:
github_token: ${{ secrets.GH_RW_TOKEN }}
branch: "main"
tags: true

## Create a release on Github.
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "@workday/canvas-tokens-web@${{steps.new-tag.outputs.tag}}"
name: "@workday/canvas-tokens-web@${{steps.new-tag.outputs.tag}}"
body: ${{steps.changeset.outputs.body}}
draft: false
prerelease: false

- name: Creating .npmrc
run: |
Expand All @@ -130,6 +115,12 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_CI_PUBLISH_TOKEN }}

# Publish to npm. Must be run after a build
- name: Publish
run: npx changeset publish
- name: Build & Publish
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"prepare": "husky install",
"test": "jest -c jest.config.ts",
"tokens-config": "ts-node scripts/tokens-config",
"typecheck": "tsc -p . --noEmit"
"typecheck": "tsc -p . --noEmit",
"release": "npm run build:tokens && changeset publish --tags latest"
},
"devDependencies": {
"@commitlint/cli": "^17.6.3",
Expand Down

0 comments on commit fb14a7c

Please sign in to comment.