Skip to content

Commit

Permalink
feat: polish the release GitHub action (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH authored Jan 17, 2024
1 parent e992d8e commit e10b775
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 47 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/push_to_new_AppStore.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
run: find . -name "screenshot*" | xargs rm -f
- name: remove all thumbnails
run: find . -name "thumbnail*" | xargs rm -f
- name: remove all icon
run: find . -name "icon.png" | xargs rm -f
- name: remove all app file
run: find . -name "appfile.json" | xargs rm -f

- name: create a build with sysroot
id: build
run: |
Expand All @@ -38,6 +43,7 @@ jobs:
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Upload to oss
id: upload_to_oss
uses: tvrcgo/upload-to-oss@master
Expand Down
34 changes: 28 additions & 6 deletions .github/workflows/release_zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
run: find . -name "screenshot*" | xargs rm -f
- name: remove all thumbnails
run: find . -name "thumbnail*" | xargs rm -f
- name: remove all icon
run: find . -name "icon.png" | xargs rm -f
- name: remove all app file
run: find . -name "appfile.json" | xargs rm -f

- name: create a build with sysroot
id: build
run: |
Expand All @@ -27,18 +32,35 @@ jobs:
pushd /tmp
zip -r main.zip build
- name: Copy
- name: Checkout pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: pages

- name: Copy build to pages
run: |
mkdir pages
cp /tmp/main.zip pages/main.zip
cp /tmp/main.zip pages/store/main.zip
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB2 }}
with:
source-directory: 'pages'
destination-github-username: 'CasaOS-AppStore'
destination-repository-name: 'casaos-appstore.github.io'
destination-github-username: 'IceWhaleTech'
destination-repository-name: 'CasaOS-AppStore'
target-branch: 'gh-pages'
user-email: [email protected]
target-directory: 'heads'
target-directory: ''

- name: Upload to oss
id: upload_to_oss
uses: tvrcgo/upload-to-oss@master
with:
key-id: ${{ secrets.OSS_KEY_ID }}
key-secret: ${{ secrets.OSS_KEY_SECRET }}
region: oss-cn-shanghai
bucket: casaos
assets: |
/tmp/main.zip:/store/main.zip

0 comments on commit e10b775

Please sign in to comment.