Skip to content

Commit

Permalink
Update package and release
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven65 committed Sep 10, 2024
1 parent c45a35e commit cea562b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,34 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update version in package.json
run: |
# Read the latest release version from environment variable
LATEST_VERSION="${{ env.LATEST_RELEASE }}"
# Update the "version" field in package.json using jq
jq --arg version "$LATEST_VERSION" '.version = $version' package.json > temp.json && mv temp.json package.json
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20.6.0
node-version: 16
- name: Inject access token in .npmrc
run: |
echo "registry=https://npm.pkg.github.com/helsingborg-stad" >> ~/.npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
- name: Run CI
if: ${{ hashFiles('package.json') != '' && hashFiles('package-lock.json') != '' }}
run: npm ci --no-progress --no-audit
- name: Run install
if: ${{ hashFiles('package.json') != '' && hashFiles('package-lock.json') == '' }}
run: npm install --no-progress --no-audit
- name: Run build
if: ${{ hashFiles('package-lock.json') != '' && hashFiles('gulp.js') == '' }}
run: npx --yes browserslist@latest --update-db && npm run build
- name: Run gulp
if: ${{ hashFiles('package-lock.json') != '' && hashFiles('gulp.js') != '' }}
run: gulp
- name: Publish npm package to GHCR
run: npm publish --registry=https://npm.pkg.github.com
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create assets zip
uses: thedoctor0/[email protected]
if: ${{ hashFiles('dist/') != '' }}
Expand Down
1 change: 0 additions & 1 deletion dist/css/better-post-ui.3dbd77fa.css

This file was deleted.

4 changes: 2 additions & 2 deletions dist/manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"css/better-post-ui.css": "css/better-post-ui.3dbd77fa.css",
"css/better-post-ui.css": "css/better-post-ui.44075cd8.css",
"js/author.js": "js/author.93a901c9a7c25dd36120.js",
"js/main.js": "js/main.b0dc5af2228c1081bda7.js",
"js/order.js": "js/order.dd1962a9231bb666f125.js",
"js/order.js": "js/order.69dccffbda6c62358c46.js",
"js/parent.js": "js/parent.c287b2b04d65ff6d73bd.js",
"js/publish-actions.js": "js/publish-actions.e12e260e889ba52f3bee.js"
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "better-post-ui",
"name": "@helsingborg-stad/better-post-ui",
"version": "3.0.3",
"description": "Improves the UI and UX of the WordPress admin post form.",
"main": "",
Expand All @@ -11,14 +11,15 @@
},
"repository": {
"type": "git",
"url": "https://github.com/Svanmark/Wordpress-Plugin-Boilerplate.git"
"url": "https://github.com/helsingborg-stad/better-post-ui.git"
},
"author": "Kristoffer Svanmark",
"license": "MIT",
"bugs": {
"url": "https://github.com/Svanmark/Wordpress-Plugin-Boilerplate/issues"
"url": "https://github.com/helsingborg-stad/better-post-ui/issues"
},
"homepage": "https://github.com/Svanmark/Wordpress-Plugin-Boilerplate",
"files": ["dist/"],
"homepage": "https://github.com/helsingborg-stad/better-post-ui",
"devDependencies": {
"@babel/core": "^7.11.0",
"@babel/plugin-proposal-class-properties": "^7.10.4",
Expand Down

0 comments on commit cea562b

Please sign in to comment.