mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Merge pull request #24 from ZoiteChat/Github-Action-Changes
Update Windows build workflow with permissions and attestations
This commit is contained in:
12
.github/workflows/appimage-build.yml
vendored
12
.github/workflows/appimage-build.yml
vendored
@@ -10,6 +10,12 @@ jobs:
|
|||||||
appimage_build:
|
appimage_build:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
|
artifact-metadata: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -113,6 +119,12 @@ jobs:
|
|||||||
appimage_path="$(ls -1 *.AppImage | grep -v linuxdeploy | head -n 1)"
|
appimage_path="$(ls -1 *.AppImage | grep -v linuxdeploy | head -n 1)"
|
||||||
mv "$appimage_path" "Zoitechat-${VERSION}-x86_64.AppImage"
|
mv "$appimage_path" "Zoitechat-${VERSION}-x86_64.AppImage"
|
||||||
|
|
||||||
|
- name: Attest AppImage (Build Provenance)
|
||||||
|
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
|
||||||
|
uses: actions/attest-build-provenance@v3
|
||||||
|
with:
|
||||||
|
subject-path: Zoitechat-*-x86_64.AppImage
|
||||||
|
|
||||||
- name: Upload AppImage artifact
|
- name: Upload AppImage artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
24
.github/workflows/flatpak-build.yml
vendored
24
.github/workflows/flatpak-build.yml
vendored
@@ -9,6 +9,13 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
flatpak_build:
|
flatpak_build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
|
artifact-metadata: write
|
||||||
|
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-49
|
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-49
|
||||||
options: --privileged
|
options: --privileged
|
||||||
@@ -18,8 +25,23 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
- name: Build Flatpak
|
||||||
|
id: flatpak_builder
|
||||||
|
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||||
with:
|
with:
|
||||||
bundle: zoitechat.flatpak
|
bundle: zoitechat.flatpak
|
||||||
manifest-path: flatpak/net.zoite.Zoitechat.json
|
manifest-path: flatpak/net.zoite.Zoitechat.json
|
||||||
cache-key: flatpak-builder-${{ github.sha }}
|
cache-key: flatpak-builder-${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Upload Flatpak Bundle
|
||||||
|
id: upload_flatpak
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: zoitechat.flatpak
|
||||||
|
path: zoitechat.flatpak
|
||||||
|
|
||||||
|
- name: Attest Flatpak Bundle (Build Provenance)
|
||||||
|
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
|
||||||
|
uses: actions/attest-build-provenance@v3
|
||||||
|
with:
|
||||||
|
subject-path: zoitechat.flatpak
|
||||||
|
|||||||
29
.github/workflows/windows-build.yml
vendored
29
.github/workflows/windows-build.yml
vendored
@@ -11,6 +11,13 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
windows_build:
|
windows_build:
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
|
artifact-metadata: write
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [x64, win32]
|
platform: [x64, win32]
|
||||||
@@ -90,12 +97,30 @@ jobs:
|
|||||||
move ..\zoitechat-build .\
|
move ..\zoitechat-build .\
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- name: Upload Installer
|
||||||
|
id: upload_installer
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Installer ${{ matrix.arch }}
|
name: Installer ${{ matrix.arch }}
|
||||||
path: ZoiteChat*.exe
|
path: ZoiteChat*.exe
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- name: Attest Installer (Artifact Attestation)
|
||||||
|
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
|
||||||
|
uses: actions/attest-build-provenance@v3
|
||||||
|
with:
|
||||||
|
subject-name: Installer ${{ matrix.arch }}
|
||||||
|
subject-digest: sha256:${{ steps.upload_installer.outputs.artifact-digest }}
|
||||||
|
|
||||||
|
- name: Upload Build Files
|
||||||
|
id: upload_buildfiles
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Build Files ${{ matrix.arch }}
|
name: Build Files ${{ matrix.arch }}
|
||||||
path: zoitechat-build
|
path: zoitechat-build
|
||||||
|
|
||||||
|
- name: Attest Build Files (Artifact Attestation)
|
||||||
|
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
|
||||||
|
uses: actions/attest-build-provenance@v3
|
||||||
|
with:
|
||||||
|
subject-name: Build Files ${{ matrix.arch }}
|
||||||
|
subject-digest: sha256:${{ steps.upload_buildfiles.outputs.artifact-digest }}
|
||||||
|
|||||||
Reference in New Issue
Block a user