-
-
Notifications
You must be signed in to change notification settings - Fork 17
30 lines (30 loc) · 1.02 KB
/
cdn-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
on:
push:
branches:
- master
jobs:
deploy-cdn:
runs-on: ubuntu-20.04
if: "contains(github.event.head_commit.message, 'Bump version')"
steps:
- uses: actions/checkout@v3
- uses: montudor/action-zip@v1
with:
args: 'zip -r ./resources.zip . -i ./*/* -x ./.*/*'
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm i -D @altmp/upload-tool
- run: |
mkdir ./dist
mv ./resources.zip ./dist/
- run: npx alt-upload dist example-resources 1.0.0
env:
AWS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_BUCKET: ${{ secrets.AWS_BUCKET }}
AWS_ENDPOINT: ${{ secrets.AWS_ENDPOINT }}
CF_CACHE_PURGE_TOKEN: ${{ secrets.CF_CACHE_PURGE_TOKEN }}
CF_CACHE_ZONE_ID: ${{ secrets.CF_CACHE_ZONE_ID }}
CF_CACHE_PURGE_URL: ${{ secrets.CF_CACHE_PURGE_URL }}
VERSION: ${{ steps.version.outputs.VERSION }}