Skip to content

Commit

Permalink
test gitee release
Browse files Browse the repository at this point in the history
  • Loading branch information
Karmenzind committed Oct 20, 2024
1 parent 441d704 commit 0235685
Showing 1 changed file with 61 additions and 29 deletions.
90 changes: 61 additions & 29 deletions .github/workflows/manual-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,79 +9,111 @@ on:
# default: 'dev'
#
jobs:
linux-part:
runs-on: ubuntu-latest
mac-part:
runs-on: macos-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: "Build Changelog"
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v5
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
mode: "COMMIT"
failOnError: true

- name: echo changelog
run: echo "${{steps.build_changelog.outputs.changelog}}"

- name: "Set up Go"
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: go.mod

- name: "Install system dependencies"
run: sudo apt-get install -y gcc-mingw-w64-x86-64 gcc-aarch64-linux-gnu

- name: "Install dependencies"
run: go mod tidy

- name: "Build"
run: |
bash scripts/build.sh linux amd64
bash scripts/build.sh linux arm64
bash scripts/build.sh windows amd64
bash scripts/build.sh darwin arm64
bash scripts/build.sh darwin amd64
- name: "Save artifacts"
uses: actions/upload-artifact@v4
with:
name: linux-and-win
name: macos
path: build
if-no-files-found: error
retention-days: 15
retention-days: 7
overwrite: true

mac-part:
runs-on: macos-latest
- name: Test
run: test -n "${{ secrets.GITEE_TOKEN }}" && echo "not empty"

- name: Test upload file to exist release
uses: nicennnnnnnlee/[email protected]
continue-on-error: true
with:
gitee_owner: void_kmz
gitee_repo: kd
gitee_token: ${{ secrets.GITEE_TOKEN }}
gitee_upload_retry_times: 3
# gitee_tag_name: "sync-test"
gitee_release_id: 443048
gitee_release_name: "sync from github (test version)"
gitee_release_body: "测试同步release\nFrom $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
gitee_target_commitish: master
gitee_files: build/*
# gitee_files: |
# build/kd_macos_arm64
# build/kd_macos_amd64

linux-part:
# needs: mac-part
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: "Build Changelog"
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v5
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
mode: "COMMIT"
failOnError: true

- name: echo changelog
run: echo "${{steps.build_changelog.outputs.changelog}}"

- name: "Set up Go"
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: go.mod

- name: "Install system dependencies"
run: sudo apt-get install -y gcc-mingw-w64-x86-64 gcc-aarch64-linux-gnu

- name: "Install dependencies"
run: go mod tidy

- name: "Build"
run: |
bash scripts/build.sh darwin arm64
bash scripts/build.sh darwin amd64
bash scripts/build.sh linux amd64
bash scripts/build.sh linux arm64
bash scripts/build.sh windows amd64
- name: "Save artifacts"
uses: actions/upload-artifact@v4
with:
name: macos
name: linux-and-win
path: build
if-no-files-found: error
retention-days: 15
retention-days: 7
overwrite: true

# - name: Test upload file to exist release
# uses: nicennnnnnnlee/[email protected]
# with:
# gitee_owner: void_kmz
# gitee_repo: kd
# gitee_token: ${{ secrets.GITEE_TOKEN }}
# gitee_release_id: "release-beta"
# gitee_upload_retry_times: 3
# gitee_files: build/*

0 comments on commit 0235685

Please sign in to comment.