Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion .dart_tool/.gitignore

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/nexus.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Release

on:
release:
types: [ published ]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/[email protected]

- name: Set up Java
uses: actions/[email protected]
with:
java-version: 8
distribution: temurin
server-id: ossrh
server-username: NEXUS_USERNAME
server-password: NEXUS_PASSWORD
gpg-passphrase: GPG_PASSPHRASE
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}

- name: Set artifact version
run: ./mvnw --batch-mode --define=generateBackupPoms=false --define=newVersion=${{ github.event.release.tag_name }} versions:set

- name: Publish package
run: ./mvnw --batch-mode --activate-profiles=deploy deploy
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

update-versions:
needs: [ publish ]
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/[email protected]
with:
ref: master
fetch-depth: 0

- name: Update pom.xml version
run: ./mvnw --batch-mode --define=generateBackupPoms=false --define=newVersion=${{ github.event.release.tag_name }} versions:set

- name: Update Maven version in README.md
run: sed --in-place 's/<version>.*<\/version>/<version>${{ github.event.release.tag_name }}<\/version>/g' README.md

- name: Show diff
run: git diff

- name: Create Pull Request
uses: peter-evans/[email protected]
with:
commit-message: Update versions to ${{ github.event.release.tag_name }}
title: Update versions to ${{ github.event.release.tag_name }}
body: Update versions to ${{ github.event.release.tag_name }}
branch: update-versions-${{ github.event.release.tag_name }}
delete-branch: true
labels: |
kind/documentation
meta/skip-changelog
12 changes: 5 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.asteriskjava</groupId>
<artifactId>asterisk-java</artifactId>
<version>${releaseVersion}</version>
<version>3.34.0</version>

<name>Asterisk-Java</name>
<description>The free Java library for Asterisk PBX integration.</description>
Expand Down Expand Up @@ -84,8 +84,6 @@
</scm>

<properties>
<releaseVersion>3.34.0</releaseVersion>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -310,13 +308,13 @@
</profiles>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</project>
Loading