Skip to content

Commit

Permalink
fix tag problem and set compile time properly
Browse files Browse the repository at this point in the history
Signed-off-by: Rafał Safin <[email protected]>
  • Loading branch information
Rafał Safin committed May 26, 2024
1 parent b143de7 commit 719c5bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: |
npm install
- name: Set release date
run: |
echo "RELEASE_DATE=$(date --rfc-3339=seconds)" >> ${GITHUB_ENV}
- name: Build
run: |
npm run build
rm -f public/openmargonem.bundle.js
sed -i "s/__version__/${{ github.ref_name }}/g" public/openmargonem.user.js
CURRENT_DATE=`date +"%Y-%m-%d %T"` sed -i "s/__compiled_at__/$CURRENT_DATE/g" public/openmargonem.user.js
sed -i "s/__compiled_at__/$RELEASE_DATE/g" public/openmargonem.user.js
cp public/openmargonem.user.js public/openmargonem.${{ github.ref_name }}.user.js
mv public/openmargonem.user.js public/openmargonem.latest.user.js
- name: Deploy scripts
Expand Down

0 comments on commit 719c5bc

Please sign in to comment.