Skip to content

Commit

Permalink
take release number from branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Coles committed Mar 11, 2021
1 parent 04a29f9 commit 0fd961d
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 26 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,17 @@ name: Release
on:
push:
branches:
- release
- release/**
jobs:
release:
runs-on: ubuntu-latest
# sonatype nexus sometimes hangs
timeout-minutes: 20
steps:
# The build number is stored as a tag in git
# If it needs to be reset (eg after a major number version change)
# run
# git tag -d build-number-<x>
# git push --delete origin build-number-<x>
- name: Generate build number
id: buildnumber
uses: einaregilsson/build-number@v3
with:
token: ${{secrets.github_token}}
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
id: extract_branch
- name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.GPG_SECRET_KEY }}") | gpg --batch --import
Expand All @@ -43,7 +37,7 @@ jobs:
git config user.email "actions@github.com"
git config user.name "GitHub Actions"
- name: Publish JAR
run: mvn -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE}} -B -Prelease deploy scm:tag -Drevision=${{ steps.buildnumber.outputs.build_number }} -DskipTests=true
run: mvn -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE}} -B -Prelease deploy scm:tag -Drevision=${{ steps.extract_branch.outputs.branch }} -DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion pitest-aggregator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.pitest</groupId>
<artifactId>pitest-parent</artifactId>
<version>1.6.${revision}</version>
<version>${revision}</version>
</parent>
<artifactId>pitest-aggregator</artifactId>
<description>Aggregates the output of report XML documents into a new combined HTML report</description>
Expand Down
2 changes: 1 addition & 1 deletion pitest-ant/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>pitest-parent</artifactId>
<groupId>org.pitest</groupId>
<version>1.6.${revision}</version>
<version>${revision}</version>
</parent>
<artifactId>pitest-ant</artifactId>
<name>pitest-ant</name>
Expand Down
2 changes: 1 addition & 1 deletion pitest-build-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>pitest-parent</artifactId>
<groupId>org.pitest</groupId>
<version>1.6.${revision}</version>
<version>${revision}</version>
</parent>

</project>
2 changes: 1 addition & 1 deletion pitest-command-line/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>pitest-parent</artifactId>
<groupId>org.pitest</groupId>
<version>1.6.${revision}</version>
<version>${revision}</version>
</parent>
<artifactId>pitest-command-line</artifactId>
<name>pitest-command-line</name>
Expand Down
2 changes: 1 addition & 1 deletion pitest-entry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>pitest-parent</artifactId>
<groupId>org.pitest</groupId>
<version>1.6.${revision}</version>
<version>${revision}</version>
</parent>
<artifactId>pitest-entry</artifactId>
<name>pitest-entry</name>
Expand Down
2 changes: 1 addition & 1 deletion pitest-groovy-verification/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>pitest-parent</artifactId>
<groupId>org.pitest</groupId>
<version>1.6.${revision}</version>
<version>${revision}</version>
</parent>
<artifactId>pitest-groovy-verification</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion pitest-html-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>pitest-parent</artifactId>
<groupId>org.pitest</groupId>
<version>1.6.${revision}</version>
<version>${revision}</version>
</parent>
<artifactId>pitest-html-report</artifactId>
<name>pitest-html-report</name>
Expand Down
2 changes: 1 addition & 1 deletion pitest-java8-verification/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>pitest-parent</artifactId>
<groupId>org.pitest</groupId>
<version>1.6.${revision}</version>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion pitest-maven-verification/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>pitest-parent</artifactId>
<groupId>org.pitest</groupId>
<version>1.6.${revision}</version>
<version>${revision}</version>
</parent>
<artifactId>pitest-maven-verification</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion pitest-maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>pitest-parent</artifactId>
<groupId>org.pitest</groupId>
<version>1.6.${revision}</version>
<version>${revision}</version>
</parent>
<artifactId>pitest-maven</artifactId>
<packaging>maven-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion pitest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>pitest-parent</artifactId>
<groupId>org.pitest</groupId>
<version>1.6.${revision}</version>
<version>${revision}</version>
</parent>
<artifactId>pitest</artifactId>
<packaging>jar</packaging>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</organization>
<artifactId>pitest-parent</artifactId>
<packaging>pom</packaging>
<version>1.6.${revision}</version>
<version>${revision}</version>
<name>pitest-parent</name>
<url>http://pitest.org</url>
<description>Mutation testing system for java - parent project</description>
Expand Down Expand Up @@ -395,8 +395,8 @@
<!-- versions of libraries which are used in different projects or which
are used for few artifacts -->
<properties>
<!-- this revision number used only for local builds, release version is held within ci -->
<revision>0-SNAPSHOT</revision>
<!-- this revision number used only for local builds -->
<revision>1.0.0-SNAPSHOT</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

Expand Down

0 comments on commit 0fd961d

Please sign in to comment.