commit
0430bdcd47
34
.github/workflows/create_and_upload_artifacts.yml
vendored
Normal file
34
.github/workflows/create_and_upload_artifacts.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
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/*
|
57
.github/workflows/release.yml
vendored
57
.github/workflows/release.yml
vendored
|
@ -1,38 +1,33 @@
|
||||||
name: Build Packages
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
push:
|
||||||
types: [published, created, edited]
|
# Sequence of patterns matched against refs/tags
|
||||||
# Run tests for any PRs
|
tags:
|
||||||
# pull_request:
|
- 'debian/*' # Push events to matching debian/*, i.e. debian/1.0-2, debian/20.15.10, debian/23.20020326
|
||||||
|
|
||||||
env:
|
name: Create Release
|
||||||
SOURCE_DIR: ./
|
|
||||||
ARTIFACTS_DIR: debian/build/release/
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: Create Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout code
|
||||||
env:
|
uses: actions/checkout@v2
|
||||||
DEBIAN_FRONTEND: "noninteractive"
|
- name: Install needed packages
|
||||||
- name: Remove github artefacts
|
run: |
|
||||||
run: |
|
sudo apt-get update && sudo apt-get install -y dpkg-dev
|
||||||
rm -rf .github/
|
- name: Gather changelog
|
||||||
- name: Adjust distibution in changelog file
|
run: |
|
||||||
run: |
|
CHANGELOG="$(dpkg-parsechangelog | tail -n +8 > debian/changelog)"
|
||||||
sed -i '0,/restricted/s//stable/' debian/changelog
|
echo "${CHANGELOG}"
|
||||||
- name: Build Debian package
|
- name: Create Release
|
||||||
uses: pi-top/action-debian-package@v4
|
id: create_release
|
||||||
with:
|
uses: actions/create-release@v1
|
||||||
artifacts_directory: debian/build/release/
|
env:
|
||||||
target_architectures: "amd64,i386"
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
||||||
- name: Upload the artifacts
|
with:
|
||||||
uses: skx/github-action-publish-binaries@master
|
tag_name: ${{ github.ref }}
|
||||||
env:
|
release_name: Release ${{ github.ref }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
body: ${CHANGELOG}
|
||||||
with:
|
draft: false
|
||||||
# releaseId: 'debian/18.20201012+4'
|
prerelease: false
|
||||||
# releaseId: ${{ needs.create_release.outputs.id }}
|
|
||||||
args: debian/build/release/*
|
|
||||||
|
|
Loading…
Reference in a new issue