Skip to content
Merged
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
18 changes: 11 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,16 @@ jobs:

- name: Bump Version Number
run: |
mvn --no-transfer-progress versions:set versions:commit -DnewVersion="${{ github.event.inputs.version }}"
mvn --no-transfer-progress versions:set versions:commit -DnewVersion="${GITHUB_EVENT_INPUTS_VERSION}"
git ls-files | grep 'pom.xml$' | xargs git add
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
git commit -m "Release Error Prone ${{ github.event.inputs.version }}"
git tag "v${{ github.event.inputs.version }}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
git commit -m "Release Error Prone ${GITHUB_EVENT_INPUTS_VERSION}"
git tag "v${GITHUB_EVENT_INPUTS_VERSION}"
echo "TARGET_COMMITISH=$(git rev-parse HEAD)" >> $GITHUB_ENV
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/google/error-prone.git
git remote set-url origin https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/google/error-prone.git
env:
GITHUB_EVENT_INPUTS_VERSION: ${{ github.event.inputs.version }}

- name: Deploy to Sonatype
env:
Expand All @@ -63,7 +65,9 @@ jobs:

- name: Push tag
run: |
git push origin "v${{ github.event.inputs.version }}"
git push origin "v${GITHUB_EVENT_INPUTS_VERSION}"
env:
GITHUB_EVENT_INPUTS_VERSION: ${{ github.event.inputs.version }}

- name: Draft Release Entry
uses: softprops/action-gh-release@v2.5.0
Expand Down
Loading