Skip to content

Commit

Permalink
Create li_maven_publish.yml (apache#3)
Browse files Browse the repository at this point in the history
* Create linkedin-publish.yml

Testing publishing with github actions

* Fix li_maven_publish workflow

* Update version numbers

* Update python versions
  • Loading branch information
dxichen committed Sep 10, 2021
1 parent ac8e744 commit ce95485
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/li_maven_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Gradle Package

on:
release:
types: [created]
push:
branches: ['li_trunk']
paths: ['runners/samza/**', 'runners/spark/**', 'buildSrc/src/main/groovy/org/apache/beam/gradle/**']

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Validate Samza runner
run: ./gradlew :runners:samza:build :runners:samza:validatesRunner :runners:samza:job-server:validatesPortableRunner

# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
run: ./gradlew publishMavenJavaPublicationToLinkedin.jfrog.httpsRepository -PnoSigning -PisRelease -PisLinkedin --no-daemon
env:
USERNAME: ${{ secrets.ARTIFACTORY_USER }}
TOKEN: ${{ secrets.ARTIFACTORY_KEY }}
2 changes: 2 additions & 0 deletions .github/workflows/li_python_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
- name: Install wheels
run: python -m pip install wheel
- name: Build source
with:
python-version: 2.7
working-directory: ./sdks/python
run: python setup.py sdist --formats=zip upload -r lijfrog
- name: Add checksums
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ class BeamModulePlugin implements Plugin<Project> {

// Automatically use the official release version if we are performing a release
// otherwise append '-SNAPSHOT'
project.version = '3.2260.2'
project.version = '2.28.0.1'
if (!isRelease(project)) {
project.version += '-SNAPSHOT'
}
Expand Down Expand Up @@ -662,6 +662,10 @@ class BeamModulePlugin implements Plugin<Project> {
maven {
name "linkedin.jfrog.https"
url "https://linkedin.jfrog.io/artifactory/beam/"
credentials {
username = System.getenv('USERNAME')
password = System.getenv('TOKEN')
}
// The maven settings plugin will load credentials from ~/.m2/settings.xml file that a user
// has configured with the Apache release and snapshot staging credentials.
// <settings>
Expand Down
2 changes: 1 addition & 1 deletion sdks/python/apache_beam/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

"""Apache Beam SDK version information and utilities."""

__version__ = '2.28.0.dev'
__version__ = '2.28.0.1'

0 comments on commit ce95485

Please sign in to comment.