Skip to content

Commit

Permalink
migrate to gh actions (via #1157)
Browse files Browse the repository at this point in the history
  • Loading branch information
eroshenkoam authored Nov 24, 2020
1 parent d830da2 commit 7716a51
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 52 deletions.
20 changes: 20 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name-template: '$NEXT_MINOR_VERSION'
tag-template: '$NEXT_MINOR_VERSION'
categories:
- title: '🚀 New Features'
labels:
- 'type:new feature'
- title: '🔬 Improvements'
labels:
- 'type:enhancement'
- title: '🐞 Bug Fixes'
labels:
- 'type:bug'

change-template: '* $TITLE (via #$NUMBER) - @$AUTHOR'
template: |
$CHANGES
## 👀 Links
[Commits since $PREVIOUS_TAG](https://github.com/allure-framework/allure2/compare/$PREVIOUS_TAG...master)
21 changes: 21 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build

on:
pull_request:
branches:
- '*'
push:
branches:
- 'master'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Gradle
run: ./gradlew build buildDeb buildRpm
13 changes: 13 additions & 0 deletions .github/workflows/labels-verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Verify type labels"

on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: zwaldowski/match-label-action@v2
with:
allowed: 'type:bug, type:enhancement, type:new feature'
14 changes: 14 additions & 0 deletions .github/workflows/release-draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Release Draft

on:
push:
branches:
- master

jobs:
update_draft_release:
runs-on: ubuntu-latest
steps:
- uses: toolmantim/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60 changes: 60 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 1.8
- run: echo "::set-output name=version::${GITHUB_REF:10}"
id: release
- name: "Gradle Build"
run: ./gradlew build buildRpm buildDeb -Pversion=${{ steps.release.outputs.version }}
- name: "Gradle Publish to Bintray"
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
run: ./gradlew bintrayUpload -Pversion=${{ steps.release.outputs.version }}
- name: "Publish Deb to GitHub"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./allure-commandline/build/distributions/allure_${{ steps.release.outputs.version }}-1_all.deb
asset_name: allure_${{ steps.release.outputs.version }}-1_all.deb
asset_content_type: application/octet-stream
- name: "Publish Rpm to GitHub"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./allure-commandline/build/distributions/allure-${{ steps.release.outputs.version }}-1.noarch.rpm
asset_name: allure_${{ steps.release.outputs.version }}-1.noarch.rpm
asset_content_type: application/octet-stream
- name: "Publish Zip to GitHub"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./allure-commandline/build/distributions/allure-commandline-${{ steps.release.outputs.version }}.zip
asset_name: allure-${{ steps.release.outputs.version }}.zip
asset_content_type: application/octet-stream
- name: "Publish Tgz to GitHub"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./allure-commandline/build/distributions/allure-commandline-${{ steps.release.outputs.version }}.tgz
asset_name: allure-${{ steps.release.outputs.version }}.tgz
asset_content_type: application/octet-stream
52 changes: 0 additions & 52 deletions Jenkinsfile

This file was deleted.

54 changes: 54 additions & 0 deletions allure-commandline/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import com.netflix.gradle.plugins.deb.Deb
import com.netflix.gradle.plugins.rpm.Rpm
import org.gradle.kotlin.dsl.support.unzipTo

plugins {
application
id("nebula.ospackage") version "8.4.1"
}

description = "Allure Commandline"
Expand Down Expand Up @@ -50,6 +55,55 @@ tasks.build {
dependsOn(tasks.installDist)
}

val preparePackageOutput by tasks.creating {
group = "Build"
dependsOn(tasks.assemble)

doLast {
unzipTo(file("build/package"), tasks.distZip.get().archiveFile.get().asFile)
}
}

ospackage {
val pack = "build/package/allure-${project.version}"
val dest = "/usr/share/allure"

packageName = "allure"
addParentDirs = false

os = org.redline_rpm.header.Os.LINUX
release = "1"

requires("java8-runtime | java8-runtime-headless | " +
"openjdk8-jre-headless | openjdk-8-jre | openjdk-8-jdk | " +
"oracle-java8-installer | oracle-java8-installer")

from("${pack}/bin", closureOf<CopySpec> {
into("${dest}/bin")
fileMode = 0x168
})
from("${pack}/config", closureOf<CopySpec> {
into("${dest}/config")
fileType = org.redline_rpm.payload.Directive.NOREPLACE
})
from("${pack}/lib", closureOf<CopySpec> {
into("${dest}/lib")
})
from("${pack}/plugins", closureOf<CopySpec> {
into("${dest}/plugins")
})
link("/usr/bin/allure", "${dest}/bin/allure")

}

val buildDeb by tasks.existing(Deb::class) {
dependsOn(preparePackageOutput)
}

val buildRpm by tasks.existing(Rpm::class) {
dependsOn(preparePackageOutput)
}

dependencies {
allurePlugin(project(path = ":behaviors-plugin", configuration = "allurePlugin"))
allurePlugin(project(path = ":custom-logo-plugin", configuration = "allurePlugin"))
Expand Down

0 comments on commit 7716a51

Please sign in to comment.