Skip to content

Commit

Permalink
cleanup: update files
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 Jul 24, 2024
1 parent 54ac40b commit a8c1eaa
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
22 changes: 18 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: build
name: Build

on:
push:
branches: [ "main" ]
pull_request:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container:
image: ghcr.io/vanilla-os/pico:main
volumes:
Expand All @@ -33,11 +34,24 @@ jobs:
dpkg-buildpackage --no-sign
mv ../*.deb ../vanilla-backgrounds.deb
- uses: softprops/action-gh-release@v1
- name: Calculate and Save Checksums
run: |
sha256sum /__w/vanilla-backgrounds/vanilla-backgrounds.deb >> checksums.txt
- uses: actions/upload-artifact@v4
with:
name: vanilla-backgrounds
path: |
checksums.txt
/__w/vanilla-backgrounds/vanilla-backgrounds.deb
- uses: softprops/action-gh-release@v2
if: github.ref == 'refs/heads/main'
with:
token: "${{ secrets.GITHUB_TOKEN }}"
tag_name: "continuous"
prerelease: true
name: "Continuous Build"
files: |
/__w/vanilla-backgrounds/vanilla-backgrounds.deb
/__w/vanilla-backgrounds/vanilla-backgrounds.deb
checksums.txt
78 changes: 78 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
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: De-bloat stock image
run: |
rm -r /run/host/usr/share/dotnet
rm -r /run/host${{ runner.tool_cache }}
- name: Install needed packages
run: |
export DEBIAN_FRONTEND=noninteractive
apt update
apt install -y build-essential debhelper-compat dh-sequence-gnome libglib2.0-dev meson
- name: Build debian package
run: |
dpkg-buildpackage --no-sign
mv ../*.deb ../vanilla-backgrounds.deb
- name: Calculate and Save Checksums
run: |
sha256sum /__w/vanilla-backgrounds/vanilla-backgrounds.deb >> checksums.txt
- uses: actions/upload-artifact@v4
with:
name: vanilla-backgrounds
path: |
checksums.txt
/__w/vanilla-backgrounds/vanilla-backgrounds.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: vanilla-backgrounds

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "${{ github.ref_name }}" --generate-notes *.deb checksums.txt

- name: Attest Release Files
id: attest
uses: actions/attest-build-provenance@v1
with:
subject-path: '*.deb, *.txt'
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/debian/.debhelper
/debian/vanilla-backgrounds
/debian/debhelper-build-stamp
/debian/vanilla-backgrounds.substvars
/debian/vanilla-backgrounds.substvars
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.3
1.0.4

0 comments on commit a8c1eaa

Please sign in to comment.