Skip to content

Commit

Permalink
cleanup: update files, add workflows
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 authored Jul 24, 2024
1 parent cf6cba0 commit 574178e
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 31 deletions.
4 changes: 0 additions & 4 deletions .github/FUNDING.yml

This file was deleted.

66 changes: 41 additions & 25 deletions .github/workflows/build.yml
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
73 changes: 73 additions & 0 deletions .github/workflows/release.yml
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'
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<img src="data/screenshot-1.png">
</div>


## Build

### Dependencies
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('org.vanillaos.FirstSetup',
version: '2.0.1',
version: '2.2.0',
meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2',
'werror=false',
Expand Down

0 comments on commit 574178e

Please sign in to comment.