Skip to content

Commit

Permalink
ci: add GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
futrime committed Oct 18, 2023
1 parent aed78c0 commit 7fbcc25
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
pull_request:
push:
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: xmake-io/github-action-setup-xmake@v1

- run: |
xmake repo -u
- run: |
xmake f -a x64 -m release -p windows -v -y
- run: |
xmake -w -y
- uses: actions/upload-artifact@v3
with:
name: movinglight-windows-x64-${{ github.sha }}
path: |
build/windows/x64/release/MovingLight.dll
build/windows/x64/release/MovingLight.pdb
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
on:
release:
types:
- published

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: xmake-io/github-action-setup-xmake@v1

- run: |
xmake repo -u
- run: |
xmake f -a x64 -m release -p windows -v -y
- run: |
xmake -w -y
- uses: actions/upload-artifact@v3
with:
name: movinglight-windows-x64-${{ github.sha }}
path: |
build/windows/x64/release/MovingLight.dll
build/windows/x64/release/MovingLight.pdb
upload-to-release:
needs:
- build
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
with:
name: movinglight-windows-x64-${{ github.sha }}
path: bin

- run: |
cp CHANGELOG.md LICENSE README.md bin/
- name: Archive release
run: |
cd bin
zip -r ../movinglight-windows-x64.zip *
cd ..
- uses: softprops/action-gh-release@v1
with:
append_body: true
files: |
movinglight-windows-x64.zip
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.3.0] - 2023-10-18

### Changed

- Adapt to BDS 1.20.31 and LiteLoaderBDS 2.16.2.

[Unreleased]: https://github.com/Futrime/CSharpProjectTemplate/compare/v2.3.0...HEAD
[2.3.0]: https://github.com/Futrime/CSharpProjectTemplate/releases/tag/v2.3.0

0 comments on commit 7fbcc25

Please sign in to comment.