Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #46 from jumpserver/dev
Browse files Browse the repository at this point in the history
feat: 固定版本
  • Loading branch information
wojiushixiaobai authored Apr 29, 2024
2 parents d95bef5 + c0e2230 commit 6e48912
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

Expand All @@ -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
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
20 changes: 12 additions & 8 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}

Expand All @@ -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
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

0 comments on commit 6e48912

Please sign in to comment.