Skip to content

Commit

Permalink
test upload script
Browse files Browse the repository at this point in the history
  • Loading branch information
troyeguo committed Jan 7, 2024
1 parent 9abb21b commit 8baa7b3
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,21 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Download release files
run: |
curl -s https://api.github.com/repos/koodo-reader/koodo-reader/releases/latest | \
jq -r ".assets[] | .browser_download_url" | \
xargs -L 1 curl -LO
- name: Get latest release
id: latest_release
uses: abatilo/release-info-action@v1.3.0
with:
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}

- name: Download all assets from latest release
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: ${{ github.repository }}
version: tags/${{ steps.latest_release.outputs.tag_name }}
file: "*"
target: release-assets/
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install B2 CLI
run: |
Expand All @@ -32,4 +42,4 @@ jobs:
- name: Upload release files to Backblaze
run: |
./b2 authorize-account ${{ secrets.B2_ACCOUNT_ID }} ${{ secrets.B2_APPLICATION_KEY }}
./b2 sync --delete --excludeRegex ".*\.git.*" release_files/ ${{ secrets.B2_BUCKET_NAME }}/${{ github.ref }}
./b2 sync --delete --excludeRegex ".*\.git.*" release-assets/ ${{ secrets.B2_BUCKET_NAME }}/${{ github.ref }}

0 comments on commit 8baa7b3

Please sign in to comment.