release-edge.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: Release for Edge
  2. on:
  3. workflow_dispatch:
  4. push:
  5. tags:
  6. - v*
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v1 # v1 keeps tags
  12. with:
  13. fetch-depth: 250 # for `action-helper`
  14. # persist-credentials: false # not implemented in v1
  15. - uses: actions/setup-node@v3
  16. with:
  17. node-version: '20'
  18. - name: Prepare
  19. run: yarn && node scripts/action-helper.js
  20. env:
  21. ACTION_BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
  22. DISCORD_WEBHOOK_RELEASE: ${{ secrets.DISCORD_WEBHOOK_RELEASE }}
  23. - name: Build
  24. env:
  25. SYNC_DROPBOX_CLIENT_ID: ${{ secrets.SYNC_DROPBOX_CLIENT_ID }}
  26. SYNC_GOOGLE_DESKTOP_ID: ${{ secrets.SYNC_GOOGLE_DESKTOP_ID }}
  27. SYNC_GOOGLE_DESKTOP_SECRET: ${{ secrets.SYNC_GOOGLE_DESKTOP_SECRET }}
  28. SYNC_ONEDRIVE_CLIENT_ID: ${{ secrets.SYNC_ONEDRIVE_CLIENT_ID }}
  29. run: |
  30. mkdir -p $ASSETS_DIR
  31. yarn build
  32. cd dist && zip -r ../$ASSETS_DIR/$ASSET_ZIP . && cd ..
  33. - uses: denoland/setup-deno@v2
  34. with:
  35. deno-version: v2.x
  36. - name: Publish to Edge
  37. run: |
  38. if [ "$PRERELEASE" != "true" ]; then
  39. deno run -A https://raw.githubusercontent.com/violentmonkey/publish-edge-ext/main/main.ts $ASSETS_DIR/$ASSET_ZIP
  40. else
  41. echo Skip BETA for Edge
  42. fi
  43. env:
  44. CLIENT_ID: ${{ secrets.EDGE_CLIENT_ID }}
  45. API_KEY: ${{ secrets.EDGE_API_KEY }}
  46. PRODUCT_ID: ${{ secrets.EDGE_PRODUCT_ID }}