-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,9 @@ jobs: | |
build-assets: | ||
needs: ['release'] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Get latest release version | ||
id: get-version | ||
|
@@ -32,6 +35,13 @@ 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: | ||
|
@@ -43,15 +53,13 @@ jobs: | |
- 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/') != '' }} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters