diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b8ae1e..041e40f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,7 @@ jobs: run: | version=$(cat VERSION) echo "version=${version}" >> $GITHUB_OUTPUT + echo "upload_version=resource-1.0.0" >> $GITHUB_OUTPUT - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 @@ -79,8 +80,8 @@ jobs: - name: Create Release run: | gh release create ${{ steps.get-version.outputs.version }} --notes "Release ${{ steps.get-version.outputs.version }}" || echo "Release already exists" - gh release upload ${{ steps.get-version.outputs.version }} opt/download/applets/* --clobber - gh release upload ${{ steps.get-version.outputs.version }} opt/download/public/* --clobber + gh release upload ${{ steps.get-version.outputs.upload_version }} opt/download/applets/* --clobber + gh release upload ${{ steps.get-version.outputs.upload_version }} opt/download/public/* --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -94,6 +95,6 @@ jobs: - name: Upload Assets to OSS run: | - ossutil mkdir oss://jms-pkg/jumpserver/web-static/releases/download/${{ steps.get-version.outputs.version }}/ || echo "Path already exists" - ossutil cp -r opt/download/applets/ oss://jms-pkg/jumpserver/web-static/releases/download/${{ steps.get-version.outputs.version }}/ --update - ossutil cp -r opt/download/public/ oss://jms-pkg/jumpserver/web-static/releases/download/${{ steps.get-version.outputs.version }}/ --update \ No newline at end of file + ossutil mkdir oss://jms-pkg/jumpserver/web-static/releases/download/${{ steps.get-version.outputs.upload_version }}/ || echo "Path already exists" + ossutil cp -r opt/download/applets/ oss://jms-pkg/jumpserver/web-static/releases/download/${{ steps.get-version.outputs.upload_version }}/ --update + ossutil cp -r opt/download/public/ oss://jms-pkg/jumpserver/web-static/releases/download/${{ steps.get-version.outputs.upload_version }}/ --update \ No newline at end of file diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 25374ce..74bd38d 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -7,6 +7,10 @@ on: description: 'Build Version' required: true default: 'v1.1.3' + upload_version: + description: 'Upload Version' + required: true + default: 'resource-1.0.0' jobs: build: @@ -34,16 +38,16 @@ jobs: run: | git config --global user.name "${GITHUB_ACTOR}" git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" - git tag -a ${{ steps.get-version.outputs.version }} -m "Release Version ${{ steps.get-version.outputs.version }}" || echo "Tag already exists" - git push origin ${{ steps.get-version.outputs.version }} || echo "Tag already exists" + git tag -a ${{ github.event.inputs.version }} -m "Release Version ${{ github.event.inputs.version }}" || echo "Tag already exists" + git push origin ${{ github.event.inputs.version }} || echo "Tag already exists" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create Release run: | - gh release create ${{ steps.get-version.outputs.version }} --notes "Release ${{ steps.get-version.outputs.version }}" || echo "Release already exists" - gh release upload ${{ steps.get-version.outputs.version }} opt/download/applets/* --clobber - gh release upload ${{ steps.get-version.outputs.version }} opt/download/public/* --clobber + gh release create ${{ github.event.inputs.version }} --notes "Release ${{ github.event.inputs.version }}" || echo "Release already exists" + gh release upload ${{ github.event.inputs.upload_version }} opt/download/applets/* --clobber + gh release upload ${{ github.event.inputs.upload_version }} opt/download/public/* --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -57,6 +61,6 @@ jobs: - name: Upload Assets to OSS run: | - ossutil mkdir oss://jms-pkg/jumpserver/web-static/releases/download/${{ steps.get-version.outputs.version }}/ || echo "Path already exists" - ossutil cp -r opt/download/applets/ oss://jms-pkg/jumpserver/web-static/releases/download/${{ steps.get-version.outputs.version }}/ --update - ossutil cp -r opt/download/public/ oss://jms-pkg/jumpserver/web-static/releases/download/${{ steps.get-version.outputs.version }}/ --update \ No newline at end of file + ossutil mkdir oss://jms-pkg/jumpserver/web-static/releases/download/${{ github.event.inputs.upload_version }}/ || echo "Path already exists" + ossutil cp -r opt/download/applets/ oss://jms-pkg/jumpserver/web-static/releases/download/${{ github.event.inputs.upload_version }}/ --update + ossutil cp -r opt/download/public/ oss://jms-pkg/jumpserver/web-static/releases/download/${{ github.event.inputs.upload_version }}/ --update \ No newline at end of file