-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configuration: remove Bintray (step 1)
- Loading branch information
1 parent
12f047b
commit 995bedc
Showing
9 changed files
with
71 additions
and
69 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,12 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
echo "$JAVA_HOME_8_X64/bin" >> $GITHUB_PATH | ||
echo "JAVA_HOME=$JAVA_HOME_8_X64" >> $GITHUB_ENV | ||
LATEST_PUBLISHED_VERSION=$(curl -L https://repo1.maven.org/maven2/io/arrow-kt/arrow-core/maven-metadata.xml | ggrep -oP '<latest>\K[^<]*') | ||
if [ "$LATEST_PUBLISHED_VERSION" == "" ]; then exit 1; fi | ||
RELEASE_VERSION=$(grep LATEST_VERSION $BASEDIR/gradle.properties | cut -d= -f2) | ||
echo "LATEST_PUBLISHED_VERSION=$LATEST_PUBLISHED_VERSION" >> $GITHUB_ENV | ||
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV | ||
echo "NEW_RELEASE_VERSION_EXISTS="$([ "$LATEST_PUBLISHED_VERSION" == "$RELEASE_VERSION" ] && echo '0' || echo '1') >> $GITHUB_ENV |
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 -e | ||
|
||
echo "LATEST_PUBLISHED_VERSION: $LATEST_PUBLISHED_VERSION" | ||
echo "RELEASE_VERSION: $RELEASE_VERSION" | ||
echo "NEW_RELEASE_VERSION_EXISTS: $NEW_RELEASE_VERSION_EXISTS" |
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
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
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 |
---|---|---|
|
@@ -21,41 +21,31 @@ jobs: | |
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Set env | ||
run: | | ||
echo "$JAVA_HOME_8_X64/bin" >> $GITHUB_PATH | ||
echo "JAVA_HOME=$JAVA_HOME_8_X64" >> $GITHUB_ENV | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: "Check versions" | ||
id: versions | ||
run: | | ||
LATEST_PUBLISHED_RELEASE_VERSION=$(curl -X GET https://api.bintray.com/packages/arrow-kt/arrow-kt/arrow/versions/_latest | jq -r '.name') | ||
RELEASE_VERSION=$(grep LATEST_VERSION $BASEDIR/gradle.properties | cut -d= -f2) | ||
NEW_RELEASE_VERSION_EXISTS=$([ "$LATEST_PUBLISHED_RELEASE_VERSION" == "$RELEASE_VERSION" ] && echo '0' || echo '1') | ||
echo "::set-output name=latest-published-release-version::$LATEST_PUBLISHED_RELEASE_VERSION" | ||
echo "::set-output name=release-version::$RELEASE_VERSION" | ||
echo "::set-output name=new-release-version-exists::$NEW_RELEASE_VERSION_EXISTS" | ||
- name: "Setup" | ||
run: brew install grep | ||
- name: "Set env" | ||
run: ${GITHUB_WORKSPACE}/.github/scripts/set-env.sh | ||
- name: "Show env" | ||
run: ${GITHUB_WORKSPACE}/.github/scripts/show-env.sh | ||
- name: "Update version when release" | ||
if: steps.versions.outputs.new-release-version-exists == '1' | ||
run: perl -pe "s/^VERSION_NAME=.*/VERSION_NAME=${{ steps.versions.outputs.release-version }}/g" -i $BASEDIR/gradle.properties | ||
if: env.NEW_RELEASE_VERSION_EXISTS == '1' | ||
run: perl -pe "s/^VERSION_NAME=.*/VERSION_NAME=$RELEASE_VERSION/g" -i $BASEDIR/gradle.properties | ||
- name: "Publish" | ||
working-directory: arrow-libs | ||
run: | | ||
./gradlew publish | ||
echo "$(cat $BASEDIR/gradle.properties | grep VERSION_NAME | cut -d'=' -f2) deployed!" | ||
- name: "Create tag" | ||
if: steps.versions.outputs.new-release-version-exists == '1' | ||
if: env.NEW_RELEASE_VERSION_EXISTS == '1' | ||
run: | | ||
git remote set-url origin https://arrow-kt:[email protected]/arrow-kt/arrow.git | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "arrow-kt" | ||
git tag -a ${{ steps.versions.outputs.release-version }} -m "Release ${{ steps.versions.outputs.release-version }}" | ||
git push origin ${{ steps.versions.outputs.release-version }} | ||
git tag -a $RELEASE_VERSION -m "Release $RELEASE_VERSION" | ||
git push origin $RELEASE_VERSION | ||
- name: "Create release notes" | ||
if: steps.versions.outputs.new-release-version-exists == '1' | ||
run: | | ||
export LATEST_PUBLISHED_VERSION=${{ steps.versions.outputs.latest-published-release-version }} | ||
export RELEASE_VERSION=${{ steps.versions.outputs.release-version }} | ||
.github/scripts/create-release-notes.sh | ||
if: env.NEW_RELEASE_VERSION_EXISTS == '1' | ||
run: ${GITHUB_WORKSPACE}/.github/scripts/create-release-notes.sh |
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
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
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
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