name: Build Wireguard-go on: workflow_dispatch: jobs: Build: name: Building Linux Version runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setting up Go uses: actions/setup-go@v2 with: go-version: 1.17 - name: Building wireguard-go run: | git clone https://git.zx2c4.com/wireguard-go cd wireguard-go go build -v -o "wireguard-go" mkdir /opt/release cp wireguard-go /opt/release - name: Uploading artifact uses: actions/upload-artifact@v2 with: name: wireguard-go # 生成的压缩包名称 path: /opt/release # 需要打包的路径 - name: Downloading artifact uses: actions/download-artifact@v2 with: # Optional, GitHub token, a Personal Access Token with `public_repo` scope if needed # Required, if artifact is from a different repo # Required, if repo is private a Personal Access Token with `repo` scope is needed #github_token: ${{secrets.GITHUB_TOKEN}} # Required, workflow file name or ID workflow: wireguard-go.yml # Optional, the status or conclusion of a completed workflow to search for # Can be one of a workflow conclusion: # "failure", "success", "neutral", "cancelled", "skipped", "timed_out", "action_required" # Or a workflow status: # "completed", "in_progress", "queued" workflow_conclusion: success # Optional, will get head commit SHA #pr: ${{github.event.pull_request.number}} # Optional, no need to specify if PR is #commit: ${{github.event.pull_request.head.sha}} # Optional, will use the branch #branch: master # Optional, defaults to all types #event: push # Optional, will use specified workflow run #run_id: 1122334455 # Optional, run number from the workflow #run_number: 34 # Optional, uploaded artifact name, # will download all artifacts if not specified # and extract them in respective subdirectories # https://github.com/actions/download-artifact#download-all-artifacts #name: wireguard-go.zip # Optional, directory where to extract artifact. Defaults to the artifact name (see `name` input) #path: extract_here # Optional, defaults to current repo #repo: ${{github.repository}} # Optional, check the workflow run whether it has an artifact # then will get the last available artifact from previous workflow # default false, just try to download from the last one check_artifacts: false # Optional, search for the last workflow run whose stored an artifact named as in `name` input # default false search_artifacts: false