Skip to content

Commit

Permalink
Update release.yml (#13)
Browse files Browse the repository at this point in the history
* Update release.yml

* Update release.yml

* Update release.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update release.yml
  • Loading branch information
akshaypatidar1999 authored Jul 29, 2021
1 parent 8eb825e commit db8ca9b
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,22 @@ on:
types: [released]

jobs:
upload_to_luarocks:
upload_to_maven_central:
runs-on: ubuntu-latest

steps:
- name: Assert branch name is master
if: ${{ github.ref != 'refs/heads/master' }}
run: |
echo "Releases can be performed only on master branch"
exit 1

- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.COMMIT_ACCESS_TOKEN }}

- name: get version from tag
- name: Get version from tag
id: get_version
run: |
realversion="${GITHUB_REF//v/}"
echo "::set-output name=VERSION::$realversion"
releaseVersion="${GITHUB_REF/refs\/tags\//}"
releaseVersion="${releaseVersion//v/}"
echo "::set-output name=VERSION::$releaseVersion"
- name: Set up publishing to maven central
uses: actions/setup-java@v2
Expand All @@ -37,12 +33,12 @@ jobs:
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: mvn versions
- name: Update version pom.xml
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}

- name: Install gpg key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | base64 --decode | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish
Expand Down

0 comments on commit db8ca9b

Please sign in to comment.