Skip to content

Commit 4b513a6

Browse files
committed
chore: Update GitHub Actions workflow to fetch all history for all branches and tags
1 parent a1d705e commit 4b513a6

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
steps:
1515
- name: Checkout repository
1616
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0 # Fetch all history for all branches and tags
1719

1820
- name: Set up Node.js
1921
uses: actions/setup-node@v3
@@ -26,7 +28,22 @@ jobs:
2628
- name: Run build script
2729
run: npm run build
2830

31+
- name: Extract version from package.json
32+
id: extract_version
33+
run: echo "::set-output name=VERSION::$(node -p -e "require('./package.json').version")"
34+
35+
- name: Create GitHub Release
36+
id: create_release
37+
uses: actions/create-release@v1
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
with:
41+
tag_name: v${{ steps.extract_version.outputs.VERSION }}
42+
release_name: Release v${{ steps.extract_version.outputs.VERSION }}
43+
draft: false
44+
prerelease: false
45+
2946
- name: Publish to npm
3047
env:
3148
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
32-
run: npm publish --access public
49+
run: npm publish --access public --registry=https://registry.npmjs.org

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "modulatecss",
3-
"version": "1.0.14",
3+
"version": "1.0.15",
44
"publishConfig": {
55
"registry": "https://npm.pkg.github.com"
66
},

0 commit comments

Comments
 (0)