Repository navigation
59 lines (50 loc) · 1.71 KB
/
Copy pathstyxcpp.yml
File metadata and controls
59 lines (50 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: styxcpp
on:
push:
branches: [master]
paths-ignore:
- 'docs/**'
- 'README.md'
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
publish:
runs-on: ubuntu-24.04
defaults:
run:
working-directory: cpp
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: The version (the branch's commits, then the commit)
run: echo "VERSION=1.0.$(git rev-list --count HEAD)-${GITHUB_SHA::8}" >> "$GITHUB_ENV"
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
server-id: github
- name: Install the toolchain
run: sudo apt-get update && sudo apt-get install -y g++-14
- name: Build and test against the engine's packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make -j"$(nproc)" CXX=g++-14 ARCH=-march=x86-64-v2
make test CXX=g++-14 ARCH=-march=x86-64-v2
- name: Make the package
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make package CXX=g++-14 ARCH=-march=x86-64-v2 PKG_VERSION="$VERSION"
- name: Publish to GitHub Packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
version="$VERSION"
mvn --batch-mode org.apache.maven.plugins:maven-deploy-plugin:3.1.2:deploy-file \
-DgroupId=com.payonel -DartifactId=styxcpp -Dversion="$version" -Dpackaging=tar.gz \
-Dfile="styxcpp-$version.tar.gz" \
-DrepositoryId=github -Durl=https://maven.pkg.github.com/payonel/styxlua
echo "Published com.payonel:styxcpp:$version" >> "$GITHUB_STEP_SUMMARY"