Mannual Trigger Workflow #9
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: Mannual Trigger Workflow | |
on: | |
workflow_dispatch: | |
# inputs: | |
# branch_name: | |
# description: 'Branch name to checkout' | |
# required: true | |
# default: 'dev' | |
# | |
jobs: | |
mac-part: | |
runs-on: macos-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Set up Go" | |
uses: actions/setup-go@v5 | |
with: | |
check-latest: true | |
go-version-file: go.mod | |
- name: "Install dependencies" | |
run: go mod tidy | |
- name: "Build" | |
run: | | |
bash scripts/build.sh darwin arm64 | |
bash scripts/build.sh darwin amd64 | |
- name: "Save artifacts" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos | |
path: build | |
if-no-files-found: error | |
retention-days: 15 | |
overwrite: true | |
- name: Test | |
run: test -n "${{ secrets.GITEE_TOKEN }}" && echo "not empty" | |
- 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/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 linux amd64 | |
bash scripts/build.sh linux arm64 | |
bash scripts/build.sh windows amd64 | |
- name: "Save artifacts" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-and-win | |
path: build | |
if-no-files-found: error | |
retention-days: 15 | |
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/* | |