Skip to content

Commit

Permalink
add action
Browse files Browse the repository at this point in the history
  • Loading branch information
dayu521 committed Mar 3, 2024
1 parent d3e2ba7 commit a3e2f10
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/archlinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: archlinux

on: workflow_dispatch

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
archliux_container:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
container:
image: archlinux
options: --privileged
permissions:
contents: write
steps:

- uses: actions/checkout@v3

- name: install packages
run: |
pacman -Syu
pacman -S clang spdlog asio openssl xmake --neede
- name: Build
run: |
xmake -vrDw -y
- name: Package
run: |
xmake pack -f "targz" -y -o ./
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: hcpp-artifact
path: ./*.tar.gz

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
# draft: true
# body_path: ${{ github.workspace }}-CHANGELOG.txt
files: ./*.tar.gz
generate_release_notes: true

0 comments on commit a3e2f10

Please sign in to comment.