Skip to content

Commit

Permalink
feat: bump Go to 1.22, add release CI
Browse files Browse the repository at this point in the history
Signed-off-by: K.B.Dharun Krishna <[email protected]>
  • Loading branch information
kbdharun committed Jun 18, 2024
1 parent 81b5938 commit 686ac30
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 19 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.22

- name: Build
run: |
Expand All @@ -27,6 +27,5 @@ jobs:
- name: Upload an artifact
uses: actions/upload-artifact@v4
with:
Name: Vib plugin
name: FSGuard
path: ./fsguard.so

41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write # to upload assets to releases
attestations: write # to upload assets attestation for build provenance
id-token: write # grant additional permission to attestation action to mint the OIDC token permission

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Build
run: |
go get ./...
go build -buildmode=c-shared -o fsguard.so -v ./...
- name: Upload Release Asset
if: github.repository == 'Vanilla-OS/vib-fsguard'
uses: softprops/action-gh-release@v2
with:
files: |
fsguard.so
- name: Attest Generated Files
if: github.repository == 'Vanilla-OS/vib-fsguard'
id: attest
uses: actions/attest-build-provenance@v1
with:
subject-path: 'fsguard.so'
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.22

- name: Test
run: |
go get ./...
go test -v
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
filelist
log.txt
*.h
*.so
*.so
7 changes: 2 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
module github.com/vanilla-os/vib-fsguard

go 1.21
go 1.22

require (
github.com/mitchellh/mapstructure v1.5.0
github.com/vanilla-os/vib/api v0.0.0-20240331150207-852011e4d96f
)
require github.com/vanilla-os/vib/api v0.0.0-20240618173922-1485e58729d9
10 changes: 2 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/vanilla-os/vib/api v0.0.0-20231203164136-c843eaca2af6 h1:J9h3w+pi9ZhhXDS+d/9IxWNbJ4hSMlUU8HFrF5RTtWE=
github.com/vanilla-os/vib/api v0.0.0-20231203164136-c843eaca2af6/go.mod h1:vjJzDfFxfFHN5O2hcMwGM9De3+H9gGa00Pr3Um6EmCA=
github.com/vanilla-os/vib/api v0.0.0-20240323151200-ee1fb88cbbfa h1:j1itnO1xevZdHFS9cXJ7aSiG0OoHnSRVgBKaEMevFO4=
github.com/vanilla-os/vib/api v0.0.0-20240323151200-ee1fb88cbbfa/go.mod h1:vjJzDfFxfFHN5O2hcMwGM9De3+H9gGa00Pr3Um6EmCA=
github.com/vanilla-os/vib/api v0.0.0-20240331150207-852011e4d96f h1:sRPpotRlyj3Qx4ftt5oYf7JQuIYTQwwPq93xomWaIKQ=
github.com/vanilla-os/vib/api v0.0.0-20240331150207-852011e4d96f/go.mod h1:vjJzDfFxfFHN5O2hcMwGM9De3+H9gGa00Pr3Um6EmCA=
github.com/vanilla-os/vib/api v0.0.0-20240618173922-1485e58729d9 h1:NA3V/7s4eofD/VSzxlRUQjIW3wStvqtch2Lsi/2blFU=
github.com/vanilla-os/vib/api v0.0.0-20240618173922-1485e58729d9/go.mod h1:vjJzDfFxfFHN5O2hcMwGM9De3+H9gGa00Pr3Um6EmCA=
3 changes: 3 additions & 0 deletions plugin_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2024, axtlos <[email protected]>
// SPDX-License-Identifier: GPL-3.0-ONLY

package main

import (
Expand Down

0 comments on commit 686ac30

Please sign in to comment.