mirror of
https://github.com/onyx-and-iris/vmrcli.git
synced 2025-02-22 09:45:25 +00:00
add release workflow
This commit is contained in:
parent
0affb2bf2d
commit
dc8395c404
67
.github/workflows/release.yml
vendored
Normal file
67
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
name: Build and Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*.*.*'
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up MSYS2
|
||||||
|
uses: msys2/setup-msys2@v2
|
||||||
|
with:
|
||||||
|
update: true
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pacman -S --noconfirm make mingw-w64-x86_64-gcc
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
make
|
||||||
|
|
||||||
|
- name: Archive build artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: vmrcli
|
||||||
|
path: ./dist
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download build artifacts
|
||||||
|
uses: actions/download-artifact@v4.1.7
|
||||||
|
with:
|
||||||
|
name: vmrcli
|
||||||
|
- name: Display structure of downloaded files
|
||||||
|
run: tree
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: Release ${{ github.ref }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
|
- name: Upload Release Asset
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./dist
|
||||||
|
asset_name: vmrcli.zip
|
||||||
|
asset_content_type: application/zip
|
2
makefile
2
makefile
@ -47,7 +47,7 @@ $(BIN_DIR) $(OBJ_DIR):
|
|||||||
|
|
||||||
# Clean up generated files
|
# Clean up generated files
|
||||||
clean:
|
clean:
|
||||||
pwsh -Command Remove-Item -Recurse $(EXE), $(OBJ_DIR) -force
|
pwsh -Command Remove-Item -Recurse $(BIN_DIR), $(OBJ_DIR) -force
|
||||||
|
|
||||||
# Include dependency files
|
# Include dependency files
|
||||||
-include $(OBJ:.o=.d)
|
-include $(OBJ:.o=.d)
|
||||||
|
Loading…
Reference in New Issue
Block a user