Skip to content

Commit

Permalink
ci: Set up GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
PaddiM8 committed Nov 2, 2023
1 parent 6447be9 commit c9af840
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: publish
on:
create:
tags:
- 'v*'
workflow_dispatch:

jobs:
binaries:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- run: |
./build.sh
cd build
tar -cJf "$(basename ./*).tar.xz" -C * .
cd ..
- uses: ncipollo/release-action@v1
with:
artifacts: "build/*.tar.xz"
allowUpdates: true
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- uses: actions/setup-node@v3
with:
node-version: '20.x'
- run: |
cd docs/.vitepress
tar -cJf docs.tar.xz -C dist .
cd -
- uses: ncipollo/release-action@v1
with:
artifacts: "docs/.vitepress/docs.tar.xz"
allowUpdates: true
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi
TARGET=linux-$ARCHITECTURE
if [ "$(uname)" = "Darwin" ]; then
TARGET=osx-$ARCHITECTURE
elif [ -n "$1" ]; then
elif [ -n "$2" ]; then
TARGET=$2-$ARCHITECTURE
fi

Expand Down
2 changes: 1 addition & 1 deletion gen-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
dotnet build ./src/Elk.csproj --output ./src/bin/Debug/gen
dotnet run --project ./doc-gen/Elk.DocGen.csproj -- ./src/bin/Debug/gen/Elk.xml ./docs/std/
cd docs
npm install
npm ci
npm run docs:build

0 comments on commit c9af840

Please sign in to comment.