Merge branch 'github_ci_release' into development
This commit is contained in:
commit
ba9e7aa793
|
@ -1,34 +0,0 @@
|
||||||
name: Build and upload packages
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published, created, edited]
|
|
||||||
|
|
||||||
env:
|
|
||||||
SOURCE_DIR: ./
|
|
||||||
ARTIFACTS_DIR: debian/build/release/
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
env:
|
|
||||||
DEBIAN_FRONTEND: "noninteractive"
|
|
||||||
- name: Remove github artefacts
|
|
||||||
run: |
|
|
||||||
rm -rf .github/
|
|
||||||
- name: Adjust distibution in changelog file
|
|
||||||
run: |
|
|
||||||
sed -i '0,/restricted/s//stable/' debian/changelog
|
|
||||||
- name: Build Debian package
|
|
||||||
uses: pi-top/action-debian-package@v4
|
|
||||||
with:
|
|
||||||
artifacts_directory: debian/build/release/
|
|
||||||
target_architectures: "amd64,i386"
|
|
||||||
- name: Upload the artifacts
|
|
||||||
uses: skx/github-action-publish-binaries@master
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
args: debian/build/release/*
|
|
45
.github/workflows/release.yml
vendored
45
.github/workflows/release.yml
vendored
|
@ -4,22 +4,28 @@ on:
|
||||||
tags:
|
tags:
|
||||||
- 'debian/*' # Push events to matching debian/*, i.e. debian/1.0-2, debian/20.15.10, debian/23.20020326
|
- 'debian/*' # Push events to matching debian/*, i.e. debian/1.0-2, debian/20.15.10, debian/23.20020326
|
||||||
|
|
||||||
name: Create Release
|
name: Release Process
|
||||||
|
|
||||||
|
env:
|
||||||
|
SOURCE_DIR: ./
|
||||||
|
ARTIFACTS_DIR: debian/build/release/
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
create-release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
release-id: ${{ steps.create_release.outputs.id }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Install needed packages
|
- name: Install needed packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update && sudo apt-get install -y dpkg-dev
|
if [ $(dpkg -l | grep -c dpkg-dev) -ne 1 ]; then sudo apt-get update && sudo apt-get install -y dpkg-dev; fi
|
||||||
- name: Gather changelog
|
- name: Gather changelog
|
||||||
run: |
|
run: |
|
||||||
CHANGELOG="$(dpkg-parsechangelog | tail -n +8 > debian/changelog)"
|
ls -la
|
||||||
echo "${CHANGELOG}"
|
dpkg-parsechangelog | tail -n +9 > debian.changelog
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
|
@ -28,6 +34,33 @@ jobs:
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ github.ref }}
|
tag_name: ${{ github.ref }}
|
||||||
release_name: Release ${{ github.ref }}
|
release_name: Release ${{ github.ref }}
|
||||||
body: ${CHANGELOG}
|
body_path: debian.changelog
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build and upload packages
|
||||||
|
needs: create-release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
env:
|
||||||
|
DEBIAN_FRONTEND: "noninteractive"
|
||||||
|
- name: Remove github artefacts
|
||||||
|
run: |
|
||||||
|
rm -rf .github/
|
||||||
|
- name: Adjust distibution in changelog file
|
||||||
|
run: |
|
||||||
|
sed -i '0,/restricted/s//stable/' debian/changelog
|
||||||
|
- name: Build Debian package
|
||||||
|
uses: pi-top/action-debian-package@v4
|
||||||
|
with:
|
||||||
|
artifacts_directory: debian/build/release/
|
||||||
|
target_architectures: "amd64,i386"
|
||||||
|
- name: Upload the artifacts
|
||||||
|
uses: skx/github-action-publish-binaries@master
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
releaseId: ${{ needs.create-release.outputs.release-id }}
|
||||||
|
args: debian/build/release/*
|
||||||
|
|
Loading…
Reference in a new issue