Skip to content

Commit

Permalink
correct ci step
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengyangliu committed Mar 4, 2022
1 parent 70a19bf commit 0d219ed
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
node-version: '14.x'

- run: npm i -g [email protected].1
- run: npm i -g [email protected].2

- name: Sync translations
run: |
Expand All @@ -44,7 +44,7 @@ jobs:
dest: external-resources-${{ steps.get-version.outputs.VERSION }}.zip

- name: Checksum
run: sha256sum external-resources-*.zip >> checksums.txt
run: sha256sum external-resources-*.zip >> ${{ steps.get-version.outputs.VERSION }}-checksums-sha256.txt

- name: Create Release
id: create_release
Expand Down Expand Up @@ -91,20 +91,20 @@ jobs:
asset_name: external-resources-${{ steps.get-version.outputs.VERSION }}.zip
asset_content_type: application/zip

# Upload to digitalocean
- name: Release resources to digital ocean spaces
run: |
export DO_KEY_ID=${{ secrets.DO_KEY_ID }}
export DO_SECRET_KEY=${{ secrets.DO_SECRET_KEY }}
upload-zip --filePath=external-resources-${{ steps.get-version.outputs.VERSION }}.zip
upload-releaseInfo
# Upload checksum
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: checksums.txt
asset_path: ${{ steps.get-version.outputs.VERSION }}-checksums-sha256.txt
asset_name: ${{ steps.get-version.outputs.VERSION }}-checksums-sha256.txt
asset_content_type: text/plain

# Upload to digitalocean
- name: Release resources to digital ocean spaces
run: |
export DO_KEY_ID=${{ secrets.DO_KEY_ID }}
export DO_SECRET_KEY=${{ secrets.DO_SECRET_KEY }}
upload-file --filePath=external-resources-${{ steps.get-version.outputs.VERSION }}.zip
upload-file --filePath=${{ steps.get-version.outputs.VERSION }}-checksums-sha256.txt
22 changes: 22 additions & 0 deletions .github/workflows/upload-release-info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Upload Release Info

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: '14.x'

- run: npm i -g [email protected]

# Fetch the release info and upload to digitalocean
- name: Release resources to digital ocean spaces
run: |
upload-releaseInfo

0 comments on commit 0d219ed

Please sign in to comment.