Skip to content

Commit

Permalink
🐛 fix: all in one (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwnmengjing authored Jul 25, 2024
1 parent 54d1fe1 commit 3443789
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
if: github.event_name != 'pull_request'
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
if: github.event_name != 'pull_request'
uses: docker/setup-buildx-action@v3
Expand Down
43 changes: 33 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
admin
public
config/*.yml
- name: Archive artifact exe
- name: Archive artifact
if: matrix.os == 'windows'
uses: actions/upload-artifact@v4
with:
Expand All @@ -64,10 +64,33 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v4

- name: Add exe
- name: Get latest release version
id: get_release
run: |
LATEST_RELEASE=$(curl -s https://api.github.com/repos/mss-boot-io/mss-boot-admin-antd/releases/latest)
VERSION=$(echo $LATEST_RELEASE | jq -r '.tag_name')
echo "LATEST_RELEASE_VERSION=${VERSION}" >> $GITHUB_ENV
- name: Download dist-local.tar.gz
run: |
mv admin-windows-amd64/admin-windows-amd64 admin-windows-amd64/admin-windows-amd64.exe
mv admin-windows-arm64/admin-windows-arm64 admin-windows-arm64/admin-windows-arm64.exe
wget https://github.com/mss-boot-io/mss-boot-admin-antd/releases/download/${{ env.LATEST_RELEASE_VERSION }}/dist-local.tar.gz
tar -zxvf dist-local.tar.gz
cp -r dist admin-linux-amd64/
cp -r dist admin-linux-arm64/
cp -r dist admin-darwin-amd64/
cp -r dist admin-darwin-arm64/
cp -r dist admin-windows-amd64/
cp -r dist admin-windows-arm64/
- name: Package
run: |
zip -r admin-linux-amd64.zip admin-linux-amd64
zip -r admin-linux-arm64.zip admin-linux-arm64
zip -r admin-darwin-amd64.zip admin-darwin-amd64
zip -r admin-darwin-arm64.zip admin-darwin-arm64
zip -r admin-windows-amd64.zip admin-windows-amd64
zip -r admin-windows-arm64.zip admin-windows-arm64
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
Expand All @@ -77,12 +100,12 @@ jobs:
with:
generate_release_notes: true
files: |
admin-linux-amd64/admin-linux-amd64
admin-linux-arm64/admin-linux-arm64
admin-darwin-amd64/admin-darwin-amd64
admin-darwin-arm64/admin-darwin-arm64
admin-windows-amd64/admin-windows-amd64.exe
admin-windows-arm64/admin-windows-arm64.exe
admin-linux-amd64.zip
admin-linux-arm64.zip
admin-darwin-amd64.zip
admin-darwin-arm64.zip
admin-windows-amd64.zip
admin-windows-arm64.zip
prerelease: false
body: |
## Pull Image
Expand Down

0 comments on commit 3443789

Please sign in to comment.