Skip to content

Commit dd33b3e

Browse files
committed
chore(ci): improve release workflow
1 parent 70d1078 commit dd33b3e

File tree

7 files changed

+4361
-1989
lines changed

7 files changed

+4361
-1989
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ jobs:
77
runs-on: ubuntu-22.04
88
steps:
99
- uses: actions/checkout@v4
10-
10+
- name: Enable corepack
11+
run: corepack enable
1112
- uses: actions/cache@v4
1213
id: yarn-cache
1314
with:
1415
path: node_modules
1516
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
16-
1717
- name: Install dependencies
1818
run: yarn install
1919

@@ -42,4 +42,3 @@ jobs:
4242
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
4343
- name: Run build test
4444
run: yarn build
45-

.github/workflows/release.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,26 @@ on:
77

88
permissions:
99
id-token: write # Required for OIDC
10-
contents: read
10+
contents: write # Required for release
1111

1212
jobs:
1313
publish:
1414
runs-on: ubuntu-22.04
15-
1615
steps:
1716
- name: Checkout code
18-
uses: actions/checkout@v2
19-
17+
uses: actions/checkout@v4
18+
- name: Enable Corepack
19+
run: corepack enable
2020
- name: Set up Node.js
21-
uses: actions/setup-node@v2
21+
uses: actions/setup-node@v4
2222
with:
2323
node-version: '20.14.0'
2424
registry-url: 'https://registry.npmjs.org'
25-
2625
- name: Install dependencies
2726
run: yarn install --frozen-lockfile
28-
2927
- name: Build production
3028
run: yarn build
31-
3229
- name: Publish to npm
33-
run: yarn publish --access public
34-
30+
run: yarn npm publish --access public
3531
- name: Create GitHub release
3632
uses: softprops/action-gh-release@v2

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,12 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
26+
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
27+
.pnp.*
28+
.yarn/*
29+
!.yarn/patches
30+
!.yarn/plugins
31+
!.yarn/releases
32+
!.yarn/sdks
33+
!.yarn/versions

.yarn/releases/yarn-4.12.0.cjs

Lines changed: 942 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-4.12.0.cjs

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"name": "@mycore-org/vue-components",
3-
"private": false,
43
"license": "GPL-3.0-or-later",
54
"version": "0.1.6",
65
"type": "module",
@@ -45,5 +44,6 @@
4544
"repository": {
4645
"type": "git",
4746
"url": "https://github.com/MyCoRe-Org/vue-components.git"
48-
}
47+
},
48+
"packageManager": "yarn@4.12.0"
4949
}

0 commit comments

Comments
 (0)