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, workflow #15

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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
28 changes: 23 additions & 5 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 @@ -32,13 +33,30 @@ jobs:
mv ../plymouth-theme-vanilla-logo*.deb ../plymouth-theme-vanilla-logo.deb
mv ../plymouth-theme-vanilla-text*.deb ../plymouth-theme-vanilla-text.deb

- uses: softprops/action-gh-release@v1
- name: Calculate and Save Checksums
run: |
sha256sum /__w/plymouth-theme-vanilla/plymouth-theme-vanilla-bgrt.deb >> checksums.txt
sha256sum /__w/plymouth-theme-vanilla/plymouth-theme-vanilla-logo.deb >> checksums.txt
sha256sum /__w/plymouth-theme-vanilla/plymouth-theme-vanilla-text.deb >> checksums.txt

- uses: actions/upload-artifact@v4
with:
name: plymouth-theme-vanilla
path: |
/__w/plymouth-theme-vanilla/plymouth-theme-vanilla-bgrt.deb
/__w/plymouth-theme-vanilla/plymouth-theme-vanilla-logo.deb
/__w/plymouth-theme-vanilla/plymouth-theme-vanilla-text.deb
checksums.txt

- 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/plymouth-theme-vanilla/plymouth-theme-vanilla-bgrt.deb
/__w/plymouth-theme-vanilla/plymouth-theme-vanilla-bgrt.deb
/__w/plymouth-theme-vanilla/plymouth-theme-vanilla-logo.deb
/__w/plymouth-theme-vanilla/plymouth-theme-vanilla-text.deb
/__w/plymouth-theme-vanilla/plymouth-theme-vanilla-text.deb
checksums.txt
88 changes: 88 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
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: apt update && apt install -y dpkg-dev build-essential debhelper plymouth plymouth-label plymouth-themes gettext meson

- name: Build debian package
run: |
dpkg-buildpackage --no-sign
mv ../plymouth-theme-vanilla-bgrt*.deb ../plymouth-theme-vanilla-bgrt.deb
mv ../plymouth-theme-vanilla-logo*.deb ../plymouth-theme-vanilla-logo.deb
mv ../plymouth-theme-vanilla-text*.deb ../plymouth-theme-vanilla-text.deb

- name: Calculate and Save Checksums
run: |
sha256sum /__w/plymouth-theme-vanilla/plymouth-theme-vanilla-bgrt.deb >> checksums.txt
sha256sum /__w/plymouth-theme-vanilla/plymouth-theme-vanilla-logo.deb >> checksums.txt
sha256sum /__w/plymouth-theme-vanilla/plymouth-theme-vanilla-text.deb >> checksums.txt

- uses: actions/upload-artifact@v4
with:
name: plymouth-theme-vanilla
path: |
/__w/plymouth-theme-vanilla/plymouth-theme-vanilla-bgrt.deb
/__w/plymouth-theme-vanilla/plymouth-theme-vanilla-logo.deb
/__w/plymouth-theme-vanilla/plymouth-theme-vanilla-text.deb
checksums.txt

- uses: actions/upload-artifact@v4
with:
name: base-files
path: |
checksums.txt
/__w/base-files/base-files.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: plymouth-theme-vanilla

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

- name: Attest Release Files
id: attest
uses: actions/attest-build-provenance@v1
with:
subject-path: '*.deb, plymouth-theme-vanilla/*.txt'
File renamed without changes.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Vanilla OS Plymouth

This package contains bgrt, logo and text variants.

---
Expand Down
Loading