Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mgz0227 authored Mar 1, 2024
1 parent 56dc01a commit 31f3a1e
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Build on Linux
name: Build, Release, and Artifact on Linux

on:
push:
branches:
- master

jobs:
build:
build_and_release:
runs-on: ubuntu-latest

steps:
Expand All @@ -24,3 +24,31 @@ jobs:
run: |
cd Builds/LinuxMakefile
CONFIG=Release make
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
MY_TOKEN: ${{ secrets.MY_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false

- name: Upload release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
MY_TOKEN: ${{ secrets.MY_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Builds/LinuxMakefile/aooserver # 替换成你的文件路径
asset_name: aooserver # 替换成你的文件名称
asset_content_type: application/octet-stream # 替换成你的文件类型

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: aooserver
path: Builds/LinuxMakefile/aooserver # 替换成你的文件路径

0 comments on commit 31f3a1e

Please sign in to comment.