release #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: | |
- v*.*.* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: remove all screenshots | |
run: find . -name "screenshot*" | xargs rm -f | |
- name: remove all thumbnails | |
run: find . -name "thumbnail*" | xargs rm -f | |
- name: create a build with sysroot | |
id: build | |
run: | | |
rm -rf /tmp/build | |
mkdir -p /tmp/build/sysroot/var/lib/casaos/appstore/default.new | |
cp -rv build/* /tmp/build/ | |
cp -rv Apps /tmp/build/sysroot/var/lib/casaos/appstore/default.new/ | |
cp -v category-list.json /tmp/build/sysroot/var/lib/casaos/appstore/default.new/ | |
cp -v recommend-list.json /tmp/build/sysroot/var/lib/casaos/appstore/default.new/ | |
cp -v README.md /tmp/build/sysroot/var/lib/casaos/appstore/default.new/ | |
pushd /tmp | |
tar zcvf linux-all-appstore-${{ github.ref_name }}.tar.gz build | |
- uses: softprops/action-gh-release@v1 | |
if: steps.build.outcome == 'success' | |
with: | |
files: /tmp/linux-all-appstore-${{ github.ref_name }}.tar.gz | |
draft: true | |
prerelease: true | |
fail_on_unmatched_files: true | |
- 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 | |
with: | |
key-id: ${{ secrets.OSS_KEY_ID }} | |
key-secret: ${{ secrets.OSS_KEY_SECRET }} | |
region: oss-cn-shanghai | |
bucket: casaos | |
assets: | | |
/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 | |
- name: Copy | |
run: | | |
mkdir pages | |
cp /tmp/linux-all-appstore-${{ github.ref_name }}.tar.gz pages/ | |
- 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: 'IceWhaleTech' | |
destination-repository-name: 'icewhaletech.github.io' | |
user-email: [email protected] | |
target-directory: '' |