Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: update files, add workflows #309

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading