Skip to content

Commit

Permalink
fix: github actions release flow
Browse files Browse the repository at this point in the history
- change semantic-release to release based on package.json version.
- publishing the package occurs when the version number changes.
- action fires on commit with message "Release vX", where x is the version.
  • Loading branch information
sandroscosta committed Sep 17, 2024
1 parent 52e0153 commit b3ff07c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,15 @@ jobs:
uses: codecov/codecov-action@v3
- name: Build
run: npm run build
- name: Release
- name: Release to npmjs
uses: pascalgn/[email protected]
with:
tag_name: "v%s"
tag_message: "v%s"
commit_pattern: "^Release (\\S+)"
workspace: "."
publish_command: "npm"
publish_args: "--non-interactive"
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}
run: npx semantic-release
NPM_AUTH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@edx/frontend-component-footer",
"version": "1.0.0-semantically-released",
"description": "Footer component for use when building Open edX frontend applications",
"name": "@nauedu/frontend-component-footer",
"version": "18.0.0",
"description": "NAU footer component for Open edX",
"main": "dist/index.js",
"publishConfig": {
"access": "public"
Expand All @@ -25,14 +25,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/openedx/frontend-component-footer.git"
"url": "git+https://github.com/fccn/frontend-component-footer-nau.git"
},
"author": "edX",
"license": "AGPL-3.0",
"bugs": {
"url": "https://github.com/openedx/frontend-component-footer/issues"
"url": "https://github.com/fccn/frontend-component-footer-nau/issues"
},
"homepage": "https://github.com/openedx/frontend-component-footer#readme",
"homepage": "https://github.com/fccn/frontend-component-footer-nau#readme",
"devDependencies": {
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
"@edx/browserslist-config": "^1.1.1",
Expand Down

0 comments on commit b3ff07c

Please sign in to comment.