fix: fix release push (#387)

This commit is contained in:
CorrectRoadH 2024-01-15 17:07:36 +08:00 committed by GitHub
parent b2270e14c6
commit 7abe3f3315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 27 deletions

View File

@ -26,6 +26,7 @@ jobs:
cp -v README.md /tmp/build/sysroot/var/lib/casaos/appstore/default.new/ cp -v README.md /tmp/build/sysroot/var/lib/casaos/appstore/default.new/
pushd /tmp pushd /tmp
tar zcvf linux-all-appstore-${{ github.ref_name }}.tar.gz build tar zcvf linux-all-appstore-${{ github.ref_name }}.tar.gz build
- uses: softprops/action-gh-release@v1 - uses: softprops/action-gh-release@v1
if: steps.build.outcome == 'success' if: steps.build.outcome == 'success'
with: with:
@ -33,6 +34,7 @@ jobs:
draft: true draft: true
prerelease: true prerelease: true
fail_on_unmatched_files: true fail_on_unmatched_files: true
- name: Get version - name: Get version
id: get_version id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
@ -48,31 +50,13 @@ jobs:
/tmp/checksums.txt:/IceWhaleTech/CasaOS-AppStore/releases/download/${{ steps.get_version.outputs.VERSION }}/checksums.txt /tmp/checksums.txt:/IceWhaleTech/CasaOS-AppStore/releases/download/${{ steps.get_version.outputs.VERSION }}/checksums.txt
/tmp/linux-all-appstore-${{ github.ref_name }}.tar.gz:/IceWhaleTech/CasaOS-AppStore/releases/download/${{ steps.get_version.outputs.VERSION }}/linux-all-appstore-${{ github.ref_name }}.tar.gz /tmp/linux-all-appstore-${{ github.ref_name }}.tar.gz:/IceWhaleTech/CasaOS-AppStore/releases/download/${{ steps.get_version.outputs.VERSION }}/linux-all-appstore-${{ github.ref_name }}.tar.gz
- name: Upload to GitHub Pages - name: Pushes to another repository
uses: actions/checkout@v4 uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB2 }}
with: with:
persist-credentials: false source-directory: '/tmp'
repository: IceWhaleTech/icewhaletech.github.io destination-github-username: 'IceWhaleTech'
path: pages destination-repository-name: 'icewhaletech.github.io'
user-email: a778917369@gmail.com
- name: Copy Files to Pages target-directory: './'
run: |
cp /tmp/linux-all-appstore-${{ github.ref_name }}.tar.gz pages/
- name: Commit and Push to Target Repository
working-directory: pages
run: |
git config user.name 'GitHub Action'
git config user.email 'a778917369@gmail.com'
git add .
git commit -m "Update app store zip"
- name: Push changes
uses: ad-m/github-push-action@master
with:
directory: pages
github_token: ${{ secrets.GITHUB_TOKEN }}
repository: IceWhaleTech/icewhaletech.github.io
branch: main