Skip to content

Commit

Permalink
feat: update workflow, add release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
  • Loading branch information
kbdharun committed Jun 30, 2024
1 parent 4632338 commit d1e3755
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 41 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Test
run: |
go get ./...
go test -v

- name: Build
run: |
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build

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 dnf.so -v ./...
- name: Upload an artifact
uses: actions/upload-artifact@v4
with:
name: Vib plugin
path: ./dnf.so

- name: Upload a Release Asset
if: github.repository == 'kbdharun/vib-dnf'
uses: softprops/action-gh-release@v2
with:
files: dnf.so

- name: Attest generated files
if: github.repository == 'kbdharun/vib-dnf'
id: attest
uses: actions/attest-build-provenance@v1
with:
subject-path: '*.so'
36 changes: 0 additions & 36 deletions plugin_test.go

This file was deleted.

0 comments on commit d1e3755

Please sign in to comment.