2023-08-10 05:26:57 +02:00
|
|
|
name: Debian Packages
|
2022-07-31 00:56:26 +02:00
|
|
|
permissions: read-all
|
|
|
|
on:
|
2024-02-22 05:25:01 +01:00
|
|
|
workflow_dispatch:
|
2022-07-31 00:56:26 +02:00
|
|
|
push:
|
|
|
|
tags:
|
2023-07-27 05:42:08 +02:00
|
|
|
- '[0-9]+.[0-9]+.[0-9]+'
|
2023-08-09 06:54:09 +02:00
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
2022-07-31 00:56:26 +02:00
|
|
|
jobs:
|
2023-08-10 05:26:57 +02:00
|
|
|
test-packages:
|
2023-08-09 06:54:09 +02:00
|
|
|
if: github.event.pull_request
|
2023-08-10 05:26:57 +02:00
|
|
|
name: Test Packages
|
2023-08-09 06:54:09 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 00:35:18 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-09 06:54:09 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Set up QEMU
|
2023-09-19 00:15:13 +02:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2023-08-09 06:54:09 +02:00
|
|
|
- name: Set up Docker Buildx
|
2023-09-19 05:23:34 +02:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-08-09 06:54:09 +02:00
|
|
|
id: buildx
|
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
- name: Available Docker Platforms
|
|
|
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
|
|
|
- name: Build Debian Packages
|
|
|
|
run: make debian-packages
|
|
|
|
- name: List generated files
|
|
|
|
run: ls -l *.deb
|
2024-02-22 05:25:01 +01:00
|
|
|
build-packages-manually:
|
2024-02-22 06:15:48 +01:00
|
|
|
if: github.event_name != 'pull_request' && github.event_name != 'push'
|
2024-02-22 05:25:01 +01:00
|
|
|
name: Build Packages Manually
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
id: buildx
|
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
- name: Available Docker Platforms
|
|
|
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
|
|
|
- name: Build Debian Packages
|
|
|
|
run: make debian-packages
|
|
|
|
- name: Upload package
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: packages
|
|
|
|
path: "*.deb"
|
|
|
|
if-no-files-found: error
|
|
|
|
retention-days: 3
|
2023-08-10 05:26:57 +02:00
|
|
|
publish-packages:
|
2024-03-10 19:59:31 +01:00
|
|
|
if: github.event_name == 'push'
|
2023-08-10 05:26:57 +02:00
|
|
|
name: Publish Packages
|
2022-07-31 00:56:26 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 00:35:18 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-31 00:56:26 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Set up QEMU
|
2023-09-19 00:15:13 +02:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2022-07-31 00:56:26 +02:00
|
|
|
- name: Set up Docker Buildx
|
2023-09-19 05:23:34 +02:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-07-31 00:56:26 +02:00
|
|
|
id: buildx
|
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
- name: Available Docker Platforms
|
|
|
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
|
|
|
- name: Build Debian Packages
|
|
|
|
run: make debian-packages
|
|
|
|
- name: List generated files
|
|
|
|
run: ls -l *.deb
|
|
|
|
- name: Upload packages to repository
|
|
|
|
env:
|
|
|
|
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
|
|
|
run: for f in *.deb; do curl -F package=@$f https://$FURY_TOKEN@push.fury.io/miniflux/; done
|