v3.3.1 - security fixes to xss issues; bump leaflet to 1.9.4; fix !a… #13
Workflow file for this run
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
name: New Version Workflow | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
test: | |
container: | |
image: node:16.13-alpine | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npm ci | |
- run: npm test | |
new-version: | |
needs: test | |
if: ${{ !contains(github.event.head_commit.message, 'NO_DEPLOY') }} | |
container: | |
image: alpine:3.11 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# setup | |
- run: apk add --no-cache subversion nodejs npm | |
- run: npm i -g [email protected] | |
- run: svn co -q https://plugins.svn.wordpress.org/leaflet-map /repo | |
- run: rm -rf /repo/trunk/* | |
- run: cp -r * /repo/trunk | |
- run: | | |
cd /repo | |
pwd | |
ls | |
ls trunk | |
# minify js | |
cd trunk/scripts | |
rm -f *.min.js | |
for file in *.js; do | |
minify $file > $(basename $file .js).min.js; | |
done | |
TAG="${{ github.ref_name }}" | |
sed -i "s/{{VERSION}}/${TAG}/g" construct-leaflet-map.min.js; | |
- run: | | |
cd /repo | |
# add all svn | |
svn add --force . | |
# new tag | |
TAG="${{ github.event.ref }}" | |
svn cp trunk tags/${TAG//refs\/tags\/v} | |
svn ci -m "${{ github.event.head_commit.message }}" --username ${{ secrets.SVN_USER }} --password ${{ secrets.SVN_PASSWORD }} |