Skip to content

Commit

Permalink
测试
Browse files Browse the repository at this point in the history
  • Loading branch information
ExquisiteCore committed Dec 17, 2023
1 parent 8a8ca12 commit d159afe
Showing 1 changed file with 24 additions and 32 deletions.
56 changes: 24 additions & 32 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rust-CI
name: Rust

on:
push:
Expand All @@ -7,36 +7,28 @@ on:
branches: [ main ]

jobs:
build:

build-win:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
run: cargo build --release
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/release/q_bot.exe
asset_name: q_bot.exe
asset_content_type: application/octet-stream
- name: Checkout
uses: actions/checkout@v1

- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true

- name: Build
run: cargo build --all --release

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: target/release/q_bot.exe
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}

0 comments on commit d159afe

Please sign in to comment.