Skip to content

Commit

Permalink
feat: Use goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
Myzel394 committed Oct 17, 2024
1 parent 45af7be commit fc792b3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
32 changes: 13 additions & 19 deletions .github/workflows/release-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check git version matches flake version
shell: bash
Expand All @@ -40,25 +42,17 @@ jobs:
- name: Check Flake
run: nix flake check

- name: Build release
run: nix build

- name: Copy config-lsp
run: cp result/bin/config-lsp .

- name: Build VS code extension
run: ./vs-code-extension/build-extension.sh

- name: Zip folder
shell: bash
run: cd vs-code-extension/out/ && zip -r vs-code-extension.zip . && cd ../..
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable

- name: Upload config-lsp
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
files: |
./config-lsp
./vs-code-extension/out/vs-code-extension.zip
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_CONFIGLSP_TOKEN }}

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ config-lsp
result
bin
debug.log

dist/
11 changes: 10 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@
};

outputs = { self, nixpkgs, utils, gomod2nix }:
utils.lib.eachDefaultSystem (system:
utils.lib.eachSystem [
"x86_64-linux"
"aarch64-linux"

"x86_64-darwin"
"aarch64-darwin"

"x86_64-windows"
"aarch64-windows"
] (system:
let
version = "0.1.0"; # CI:CD-VERSION
pkgs = import nixpkgs {
Expand Down

0 comments on commit fc792b3

Please sign in to comment.