-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup: update files, add workflows
Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
- Loading branch information
Showing
5 changed files
with
115 additions
and
31 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,38 +1,54 @@ | ||
name: Build release packages | ||
name: Build | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
|
||
jobs: | ||
build-packages: | ||
runs-on: ubuntu-22.04 | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/vanilla-os/pico:main | ||
volumes: | ||
- /proc:/proc | ||
- /:/run/host | ||
options: --privileged -it | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
# Misc | ||
# -------------------------------------- | ||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::$(cat VERSION) | ||
run: echo "{VERSION}={$(cat VERSION)}" >> $GITHUB_OUTPUT | ||
|
||
# Dependencies | ||
# -------------------------------------- | ||
- name: Install build dependencies | ||
run: | | ||
sudo apt install -y debhelper python3 gettext build-essential desktop-file-utils ninja-build meson libadwaita-1-dev make | ||
apt install -y debhelper python3 gettext build-essential desktop-file-utils ninja-build meson libadwaita-1-dev make libnm-dev libnma-dev libnma-gtk4-dev | ||
# Deb Build | ||
# -------------------------------------- | ||
- name: Build .deb package | ||
run: dpkg-buildpackage | ||
run: | | ||
dpkg-buildpackage | ||
mv ../vanilla-first-setup_*.deb . | ||
- name: Calculate and Save Checksums | ||
run: | | ||
sha256sum vanilla-first-setup_*.deb >> checksums.txt | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: first-setup | ||
path: | | ||
checksums.txt | ||
vanilla-first-setup_*.deb | ||
# Release packages | ||
# -------------------------------------- | ||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
- uses: softprops/action-gh-release@v2 | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
draft: false | ||
prerelease: false | ||
automatic_release_tag: ${{ steps.get_version.outputs.VERSION }} | ||
title: ${{ steps.get_version.outputs.VERSION }} | ||
files: ../vanilla-first-setup_*.deb | ||
token: "${{ secrets.GITHUB_TOKEN }}" | ||
tag_name: "continuous" | ||
prerelease: true | ||
name: "Continuous Build" | ||
files: | | ||
checksums.txt | ||
vanilla-first-setup_*.deb |
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,73 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build-artifacts: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/vanilla-os/pico:main | ||
volumes: | ||
- /proc:/proc | ||
- /:/run/host | ||
options: --privileged -it | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::$(cat VERSION) | ||
|
||
- name: Install build dependencies | ||
run: | | ||
apt install -y debhelper python3 gettext build-essential desktop-file-utils ninja-build meson libadwaita-1-dev make libnm-dev libnma-dev libnma-gtk4-dev | ||
- name: Build .deb package | ||
run: dpkg-buildpackage | ||
|
||
- name: Calculate and Save Checksums | ||
run: | | ||
sha256sum vanilla-first-setup_2.2.0_amd64.deb >> checksums.txt | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: first-setup | ||
path: | | ||
checksums.txt | ||
vanilla-first-setup_2.2.0_amd64.deb | ||
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: first-setup | ||
|
||
- name: Create Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: gh release create "${{ github.ref_name }}" --generate-notes *.deb first-setup/checksums.txt | ||
|
||
- name: Attest Release Files | ||
id: attest | ||
uses: actions/attest-build-provenance@v1 | ||
with: | ||
subject-path: '*.deb, first-setup/*.txt' |
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 |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
<img src="data/screenshot-1.png"> | ||
</div> | ||
|
||
|
||
## Build | ||
|
||
### Dependencies | ||
|
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