Skip to content

style: fix warnings #48

style: fix warnings

style: fix warnings #48

Workflow file for this run

name: Semantic Release
on:
workflow_dispatch:
push:
branches:
- master
- client-server
permissions:
contents: write
issues: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}
jobs:
get-next-version:
uses: semantic-release-action/next-release-version/.github/workflows/next-release-version.yml@v4
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
if: needs.get-next-version.outputs.new-release-published == 'true'
needs:
- get-next-version
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
- os: ubuntu-latest
target: i686-unknown-linux-musl
- os: ubuntu-latest
target: x86_64-unknown-freebsd
- os: ubuntu-latest
target: i686-unknown-freebsd
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: windows-latest
target: aarch64-pc-windows-msvc
- os: windows-latest
target: i686-pc-windows-msvc
steps:
- name: Echo version
run: |
echo "Detected version: ${{ needs.get-next-version.outputs.new-release-version }}"
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Install semantic-release-cargo
uses: taiki-e/install-action@v2
with:
tool: semantic-release-cargo@2
- name: Prepare semantic-release for Rust
run: semantic-release-cargo prepare ${{ needs.get-next-version.outputs.new-release-version }}
- name: Install additional targets
run: rustup target add ${{ matrix.target }}
- name: Install cross
run: cargo install cross
- name: Build and copy (Windows)
if: contains(matrix.target, 'windows')
shell: pwsh
run: |
cross build --release --target ${{ matrix.target }}
New-Item -ItemType Directory -Force -Path dist
$ARCH = "${{ matrix.target }}" -split '-' | Select-Object -First 1
Copy-Item "target/${{ matrix.target }}/release/cord.exe" -Destination "dist/${ARCH}-windows-cord.exe"
- name: Build and copy (Non-Windows)
if: contains(matrix.target, 'windows') != true
run: |
cross build --release --target ${{ matrix.target }}
mkdir -p dist
ARCH=$(echo ${{ matrix.target }} | cut -d '-' -f 1)
if [[ "${{ matrix.target }}" == *"linux"* ]]; then
cp target/${{ matrix.target }}/release/cord dist/${ARCH}-linux-cord
elif [[ "${{ matrix.target }}" == *"darwin"* ]]; then
cp target/${{ matrix.target }}/release/cord dist/${ARCH}-darwin-cord
elif [[ "${{ matrix.target }}" == *"freebsd"* ]]; then
cp target/${{ matrix.target }}/release/cord dist/${ARCH}-bsd-cord
fi
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: binaries
path: dist/*
release:
runs-on: ubuntu-latest
if: needs.get-next-version.outputs.new-release-published == 'true'
needs: [get-next-version, build]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: binaries
path: dist
- name: Invoke semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install -g semantic-release
npm install -g @semantic-release/changelog
npm install -g @semantic-release/git
npm install -g @semantic-release/github
npx semantic-release
luarocks:
name: LuaRocks Publish
runs-on: ubuntu-latest
if: needs.get-next-version.outputs.new-release-published == 'true'
needs: [get-next-version, build]
steps:
- uses: actions/checkout@v4
- uses: nvim-neorocks/luarocks-tag-release@v7
with:
# version: ${{ needs.get-next-version.outputs.new-release-version }}
version: "scm"
detailed_description: |
Meet the future of rich presence with Cord, the most extensible Discord Rich Presence plugin for Neovim, powered by Rust.
Cord offers a wide range of customization options allowing you to create custom and dynamic experiences that adapt to your needs.
The possibilities are endless, and the only limit is your creativity!
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}