Skip to content

Commit f0b601b

Browse files
committed
Create new build file that builds latest version
1 parent 19d58eb commit f0b601b

File tree

3 files changed

+39
-70
lines changed

3 files changed

+39
-70
lines changed

.github/workflows/build.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
schedule:
9+
- cron: '30 13 * * *'
10+
11+
jobs:
12+
build:
13+
14+
runs-on: macos-12
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- run: brew install make ninja
19+
- run: make tools
20+
- run: make clean
21+
- run: make
22+
- run: zip -r PathOfBuilding.zip PathOfBuilding.app
23+
24+
# Based on https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
25+
- id: get-version
26+
run: |
27+
version=$(sed -n 's/^.*number="\([0-9.]*\)".*$/\1/p' PathOfBuilding/manifest.xml)
28+
echo "VERSION=$version" >> "$GITHUB_OUTPUT"
29+
- name: Upload MacOS artifacts into Github
30+
uses: ncipollo/release-action@v1
31+
with:
32+
artifacts: "PathOfBuilding.zip"
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
allowUpdates: true
35+
tag: v${{ steps.get-version.outputs.VERSION }}
36+
if: github.ref == 'refs/heads/master'

.github/workflows/main.yaml

Lines changed: 0 additions & 50 deletions
This file was deleted.

Makefile

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,6 @@ all: frontend pob
2121
cp ${DIR}/Info.plist.sh ${DIR}/PathOfBuilding.app/Contents/Info.plist; \
2222
echo 'Finished'
2323

24-
# Sign with the first available identity
25-
sign:
26-
echo 'Signing with the first available identity'; \
27-
rm -rf PathOfBuilding.app/Contents/MacOS/spec/TestBuilds/3.13; \
28-
codesign -v --force --deep --sign $$(security find-identity -v -p codesigning | grep Distribution | awk 'FNR == 1 {print $$2}') PathOfBuilding.app/Contents/MacOS/lcurl.so PathOfBuilding.app/Contents/libs/*; \
29-
codesign -v --force --deep --sign $$(security find-identity -v -p codesigning | grep Distribution | awk 'FNR == 1 {print $$2}') PathOfBuilding.app/Contents/MacOS/PathOfBuilding; \
30-
codesign -v --force --deep --sign $$(security find-identity -v -p codesigning | grep Distribution | awk 'FNR == 1 {print $$2}') PathOfBuilding.app; \
31-
codesign -d -v PathOfBuilding.app
32-
33-
# We remove the `launch.devMode or` to ensure the user's builds are stored not in
34-
# the binary, but within their user directory
35-
36-
# Relevant code is:
37-
#
38-
# ```lua
39-
# if launch.devMode or (GetScriptPath() == GetRuntimePath() and not launch.installedMode) then
40-
# -- If running in dev mode or standalone mode, put user data in the script path
41-
# self.userPath = GetScriptPath().."/"
42-
# ```
4324
pob: load_pob luacurl frontend
4425
rm -rf PathOfBuildingBuild; \
4526
cp -rf PathOfBuilding PathOfBuildingBuild; \
@@ -50,10 +31,12 @@ pob: load_pob luacurl frontend
5031
frontend:
5132
arch=x86_64 meson -Dbuildtype=release --prefix=${DIR}/PathOfBuilding.app --bindir=Contents/MacOS build
5233

34+
# We checkout the latest version.
5335
load_pob:
5436
git clone https://github.com/PathOfBuildingCommunity/PathOfBuilding.git; \
5537
pushd PathOfBuilding; \
56-
git add . && git fetch && git reset --hard origin/dev; \
38+
git fetch; \
39+
git add . && git reset --hard HEAD && git checkout $$(git describe --tags $$(git rev-list --tags --max-count=1)); \
5740
popd
5841

5942
luacurl:

0 commit comments

Comments
 (0)