Skip to content

publish

publish #52

Workflow file for this run

name: publish
on:
create:
tags:
- 'v*'
workflow_dispatch:
jobs:
macOS-binaries:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Build elk
run: |
./build.sh x64
./build.sh arm64
- uses: actions/upload-artifact@v4
with:
name: macOS-x64
path: build/*-x64/*.tar.*
- uses: actions/upload-artifact@v4
with:
name: macOS-arm64
path: build/*-arm64/*.tar.*
linux-binaries:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Install arm toolchain
if: runner.os == 'Linux'
run: |
sudo dpkg --add-architecture arm64
sudo bash -c 'cat > /etc/apt/sources.list.d/arm64.list <<EOF
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc) main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc)-updates main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc)-backports main restricted universe multiverse
EOF'
sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
sudo sed -i -e 's/deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list
sudo apt update
sudo apt install -y clang llvm binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu zlib1g-dev:arm64
- name: Build elk
run: |
./build.sh x64
./build.sh arm64
- uses: actions/upload-artifact@v4
with:
name: linux-x64
path: build/*-x64/*.tar.*
- uses: actions/upload-artifact@v4
with:
name: linux-arm64
path: build/*-arm64/*.tar.*
windows-binaries:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- run: |
./Build.ps1 x64
./Build.ps1 arm64
Compress-Archive -Path build/win-x64 -Destination win-x64.zip
Compress-Archive -Path build/win-arm64 -Destination win-arm64.zip
- uses: actions/upload-artifact@v4
with:
name: win-x64
path: win-x64.zip
- uses: actions/upload-artifact@v4
with:
name: win-arm64
path: win-arm64.zip
create-release:
runs-on: ubuntu-latest
needs: [linux-binaries, macOS-binaries, windows-binaries]
steps:
- uses: actions/checkout@v3
- run: |
mkdir build
- name: Download Artifact
uses: actions/download-artifact@v4
with:
path: build
merge-multiple: true
- name: Upload Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
du build
gh release create ${{ github.ref_name }} build/**/*
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: |
./gen-docs.sh
- uses: netlify/actions/cli@master
with:
args: deploy --dir=docs/.vitepress/dist --prod
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
push-vim-plugin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: "PaddiM8/elk-vim"
ref: "main"
token: ${{ secrets.ACCESS_TOKEN_GITHUB }}
- run: |
git config --global user.email "<>"
git config --global user.name "GitHub Actions"
mv README.md ..
rm -rf *
git clone https://github.com/PaddiM8/elk elk-tmp
mv ../README.md .
cp -r elk-tmp/editors/vim/* .
rm -rf elk-tmp
git add .
git commit -m "${{ github.ref_name }}" || echo Didn't commit
git push origin main || echo Didn't push