-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e79c64
commit 1f5000d
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
set -o errexit # abort on nonzero exitstatus | ||
set -o nounset # abort on unbound variable | ||
set -o pipefail # don't hide errors within pipes | ||
|
||
echo "Hi!" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build Debian Package | ||
on: | ||
push: | ||
branches: [ "main", "feature/debian" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
cache: maven | ||
- name: Build with Maven | ||
run: mvn -B clean install -Plinux -Pci-build -Dno-native-profile | ||
- name: Describe current commit | ||
run: echo "commit_sha=${GITHUB_SHA::7}" >> $GITHUB_ENV | ||
- name: Remove Previous Build Artifacts | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const { owner, repo } = context.issue; | ||
(await github.rest.actions.listArtifactsForRepo({ owner, repo })).data.artifacts | ||
.filter(({ name }) => (name.startsWith('pdf-over-${{ github.event.pull_request.number || github.ref_name }}-') && name.endsWith('linux-x86_64'))) | ||
.forEach(({ id, name }) => { console.log('Deleting '+name+' ('+id+')'); github.rest.actions.deleteArtifact({ owner, repo, artifact_id: id }); }); | ||
- name: Set executable permissions | ||
run: chmod +x pdf-over-build/*.sh pdf-over-build/jre/bin/* | ||
- name: Set executable permissions | ||
run: bash .github/helper/debian-package-builder.sh | ||
#- name: Tar bundle | ||
# run: tar -C pdf-over-build -cvf pdf-over.tar ./ | ||
#- name: Upload Build Artifacts | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: pdf-over-${{ github.event.pull_request.number || github.ref_name }}-${{ env.commit_sha }}-linux-x86_64 | ||
# path: pdf-over.tar | ||
|
||
permissions: | ||
contents: read | ||
#actions: write |