Skip to content

Commit a8d6191

Browse files
committed
chore(ci): improve release workflow
1 parent 0be000c commit a8d6191

File tree

7 files changed

+4415
-2014
lines changed

7 files changed

+4415
-2014
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 4 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

@@ -34,12 +34,11 @@ jobs:
3434
runs-on: ubuntu-22.04
3535
needs: setup
3636
steps:
37-
- uses: actions/checkout@v3
37+
- uses: actions/checkout@v4
3838
- uses: actions/cache@v4
3939
id: yarn-cache
4040
with:
4141
path: node_modules
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"name": "@mycore-org/vue-access-key-manager",
3-
"private": false,
43
"license": "GPL-3.0-or-later",
54
"version": "0.1.10",
65
"type": "module",
@@ -15,7 +14,6 @@
1514
"build": "vite build",
1615
"lint": "eslint src --max-warnings 0"
1716
},
18-
"dependencies": {},
1917
"peerDependencies": {
2018
"@jsr/mycore__js-common": "^0.0.7",
2119
"@mycore-org/vue-components": "^0.1.5",
@@ -50,5 +48,6 @@
5048
"repository": {
5149
"type": "git",
5250
"url": "https://github.com/MyCoRe-Org/vue-access-key-manager.git"
53-
}
51+
},
52+
"packageManager": "yarn@4.12.0"
5453
}

0 commit comments

Comments
 (0)