|
|
@@ -19,6 +19,8 @@ jobs:
|
|
|
steps:
|
|
|
- name: Checkout code
|
|
|
uses: actions/checkout@v2
|
|
|
+ with:
|
|
|
+ fetch-depth: 2 # for the `has-changed-path` action
|
|
|
- uses: actions/setup-node@v2
|
|
|
with:
|
|
|
node-version: '15'
|
|
|
@@ -26,11 +28,13 @@ jobs:
|
|
|
- name: Build
|
|
|
run: yarn && yarn build
|
|
|
|
|
|
- - name: Upload Artifact
|
|
|
+ - name: Upload Artifact - get version
|
|
|
uses: nyaa8/package-version@v1
|
|
|
- - uses: benjlevesque/[email protected]
|
|
|
+ - name: Upload Artifact - get short SHA
|
|
|
+ uses: benjlevesque/[email protected]
|
|
|
id: short-sha
|
|
|
- - uses: actions/upload-artifact@v2
|
|
|
+ - name: Upload Artifact
|
|
|
+ uses: actions/upload-artifact@v2
|
|
|
continue-on-error: true
|
|
|
with:
|
|
|
name: 'Violentmonkey-test-webext-v${{ env.PACKAGE_VERSION }}-git${{ steps.short-sha.outputs.sha }}'
|
|
|
@@ -38,12 +42,13 @@ jobs:
|
|
|
if-no-files-found: error
|
|
|
retention-days: 30
|
|
|
|
|
|
- - name: Upload to Transifex
|
|
|
+ - name: Upload to Transifex - check src
|
|
|
uses: marceloprado/has-changed-path@v1
|
|
|
id: changed-path-src
|
|
|
with:
|
|
|
paths: src
|
|
|
- - if: steps.changed-path-src.outputs.changed == 'true'
|
|
|
+ - name: Upload to Transifex
|
|
|
+ if: steps.changed-path-src.outputs.changed == 'true'
|
|
|
run: 'curl -i -L --user api:$TRANSIFEX_TOKEN -X PUT -F file=@dist/_locales/en/messages.json https://www.transifex.com/api/2/project/violentmonkey-nex/resource/messagesjson/content/'
|
|
|
env:
|
|
|
TRANSIFEX_TOKEN: ${{ secrets.TRANSIFEX_TOKEN }}
|