-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: revamp CI and package versioning, update deps
Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
- Loading branch information
Showing
8 changed files
with
111 additions
and
129 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build-artifacts: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/vanilla-os/pico:main | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22 | ||
|
||
- name: Install Build Dependencies | ||
run: | | ||
apt-get update | ||
apt-get install -y pkg-config build-essential | ||
- name: Build | ||
run: go build -o apx -ldflags="-X 'main.Version=${{ github.ref_name }}'" | ||
|
||
- name: Compress Package | ||
run: tar -czvf apx.tar.gz apx | ||
|
||
- name: Compress Manpage | ||
run: tar -czvf apx-man.tar.gz man/man1/apx.1 | ||
|
||
- name: Calculate and Save Checksums | ||
run: | | ||
sha256sum apx.tar.gz >> checksums.txt | ||
sha256sum apx-man.tar.gz >> checksums.txt | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: apx | ||
path: | | ||
apx.tar.gz | ||
apx-man.tar.gz | ||
checksums.txt | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: build-artifacts | ||
permissions: | ||
contents: write # to create and 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: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Download Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: apx | ||
|
||
- name: Create Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: gh release create "${{ github.ref_name }}" --generate-notes *.tar.gz checksums.txt | ||
|
||
- name: Attest Release Files | ||
id: attest | ||
uses: actions/attest-build-provenance@v1 | ||
with: | ||
subject-path: '*.tar.gz, checksums.txt' |
This file was deleted.
Oops, something went wrong.
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
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
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