File tree 2 files changed +16
-7
lines changed
2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 23
23
build-assets :
24
24
needs : ['release']
25
25
runs-on : ubuntu-latest
26
+ permissions :
27
+ contents : read
28
+ packages : write
26
29
steps :
27
30
- name : Get latest release version
28
31
id : get-version
32
35
uses : actions/checkout@v4
33
36
with :
34
37
fetch-depth : 0
38
+ - name : Update version in package.json
39
+ run : |
40
+ # Read the latest release version from environment variable
41
+ LATEST_VERSION="${{ env.LATEST_RELEASE }}"
42
+
43
+ # Update the "version" field in package.json using jq
44
+ jq --arg version "$LATEST_VERSION" '.version = $version' package.json > temp.json && mv temp.json package.json
35
45
- name : Setup node
36
46
uses : actions/setup-node@v3
37
47
with :
@@ -43,15 +53,13 @@ jobs:
43
53
- name : Run CI
44
54
if : ${{ hashFiles('package.json') != '' && hashFiles('package-lock.json') != '' }}
45
55
run : npm ci --no-progress --no-audit
46
- - name : Run install
47
- if : ${{ hashFiles('package.json') != '' && hashFiles('package-lock.json') == '' }}
48
- run : npm install --no-progress --no-audit
49
56
- name : Run build
50
57
if : ${{ hashFiles('package-lock.json') != '' && hashFiles('gulp.js') == '' }}
51
58
run : npx --yes browserslist@latest --update-db && npm run build
52
- - name : Run gulp
53
- if : ${{ hashFiles('package-lock.json') != '' && hashFiles('gulp.js') != '' }}
54
- run : gulp
59
+ - name : Publish npm package to GHCR
60
+ run : npm publish --registry=https://npm.pkg.github.com
61
+ env :
62
+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
55
63
- name : Create assets zip
56
64
uses : thedoctor0/zip-release@0.7.5
57
65
if : ${{ hashFiles('dist/') != '' }}
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " modularity-form-builder" ,
2
+ "name" : " @helsingborg-stad/ modularity-form-builder" ,
3
3
"version" : " 3.2.3" ,
4
4
"description" : " Formbuilder for modularity" ,
5
5
"main" : " " ,
22
22
" > 1%" ,
23
23
" not dead"
24
24
],
25
+ "files" : [" dist/" ],
25
26
"devDependencies" : {
26
27
"@babel/core" : " ^7.17.2" ,
27
28
"@babel/plugin-proposal-class-properties" : " ^7.16.7" ,
You can’t perform that action at this time.
0 commit comments