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

Create main.yml #945

Closed
wants to merge 2 commits into from
Closed
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
65 changes: 65 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build debian package
on:
push:
branches: [ 'master', 'next', 'debian-package' ]
tags:
- build**
- testing-**
pull_request:
jobs:
build-deb:
strategy:
matrix:
os: [ ubuntu-latest ]
distribution: [temurin]
java: [17]

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Wrapper validation
uses: gradle/wrapper-validation-action@v1

- name: Setup java
uses: actions/setup-java@v3
with:
cache: 'gradle'
distribution: '${{ matrix.distribution }}'
java-version: '${{ matrix.java }}'

- name: Install dependencies
run: |
sudo apt update
sudo apt install build-essential debhelper devscripts equivs -y

- name: Install package build dependencies
run: |
install_tool="apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes"
sudo mk-build-deps --install -r --tool="${install_tool}" debian/control

- name: Build package
run: |
sudo gbp buildpackage --git-ignore-branch --git-upstream-tag="HEAD" -us -uc --git-ignore-new || (EDITOR=true dpkg-source --commit . hack-1 && sudo gbp buildpackage --git-ignore-branch --git-upstream-tag="HEAD" -us -uc --git-ignore-new)

- name: Get package info
run: |
dpkg -I ../freenet*.deb
file ../freenet*.deb
cp ../freenet*.deb ./

- name: Provide Debian Package
uses: actions/upload-artifact@v3
with:
name: debian-package
path: freenet_*.debJava:
beautifiers:
- Pretty Diff
align_assignments: true
break_chained_methods: true
indent_comments: true
indent_size: 4
indent_style: tab
multiline_ternary: !<tag:yaml.org,2002:js/undefined> ''
wrap_line_length: 80
Loading