Build nightly release #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build nightly release | |
permissions: | |
contents: write | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
build-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check git version matches flake version | |
shell: bash | |
run: | | |
if ! [ $(echo '${{ github.ref }}' | cut -d'v' -f 2) = $(grep '# CI:CD-VERSION$' flake.nix | cut -d'"' -f 2) ]; | |
then | |
echo "Version mismatch between Git and flake" | |
exit 1 | |
fi | |
- name: Check version in code matches flake version | |
shell: bash | |
run: | | |
if ! [ $(grep '// CI:CD-VERSION$' server/root-handler/handler.go | cut -d'"' -f 2) = $(grep '# CI:CD-VERSION$' flake.nix | cut -d'"' -f 2) ]; | |
then | |
echo "Version mismatch between code and flake" | |
exit 1 | |
fi | |
- uses: cachix/install-nix-action@v27 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check Flake | |
run: nix flake check | |
- name: Build release | |
run: nix build | |
- name: Upload config-lsp | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
with: | |
files: result/bin/config-lsp | |
- name: Build VS code extension | |
run: ./vs-code-extension/build-extension.sh | |
- name: Upload VS Code extension | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
with: | |
path: ./vs-code-extension/out/ | |