Bump url from 2.4.0 to 2.4.1 #205
Workflow file for this run
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: Run Build and Test | |
on: | |
push: | |
branches: [ "master" ] | |
tags: | |
- v* | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
test: | |
name: test on ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, macos-13] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- run: CARGO_BAZEL_ISOLATED=0 CARGO_BAZEL_REPIN=true bazelisk test --test_output=all //clash_lib/... //clash/... | |
release: | |
name: Create Github Release | |
if: contains(github.ref, 'tags/v') | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Output Release URL File | |
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt | |
- name: Save Release URL File for publish | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release_url | |
path: release_url.txt | |
publish: | |
if: contains(github.ref, 'tags/v') | |
needs: [test, release] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, macos-13] | |
include: | |
- os: ubuntu-22.04 | |
platform: linux-amd64 | |
- os: macos-13 | |
platform: darwin-amd64 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Load Release URL File from release job | |
uses: actions/download-artifact@v3 | |
with: | |
path: release_url | |
name: release_url | |
- name: Build | |
run: CARGO_BAZEL_ISOLATED=0 CARGO_BAZEL_REPIN=true bazel build --strip=always //clash/... | |
- name: Get Release Upload URL | |
id: get_release_info | |
run: | | |
value=`cat release_url/release_url.txt` | |
echo "upload_url=$value" >> $GITHUB_OUTPUT | |
env: | |
TAG_REF_NAME: ${{ github.ref }} | |
REPOSITORY_NAME: ${{ github.repository }} | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release_info.outputs.upload_url }} | |
asset_path: ./bazel-bin/clash/clash | |
asset_name: clash-${{ matrix.platform }} | |
asset_content_type: application/octet-stream |