-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from settle-finance/workflow
Update Workflow
- Loading branch information
Showing
1 changed file
with
8 additions
and
23 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 |
---|---|---|
@@ -1,31 +1,16 @@ | ||
name: Tag and Release on Main Push | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
tag-and-release: | ||
|
||
trigger-jitpack-build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Git credentials | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "sharansalian" | ||
- name: Get commit SHA | ||
id: commit_sha | ||
run: echo "${GITHUB_SHA::8}" # Extracts the first 8 characters of the commit SHA | ||
- name: checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Create Tag and Release | ||
- name: trigger build on jitpack | ||
run: | | ||
git tag -a "v${{ steps.commit_sha.outputs.stdout }}" -m "Automated tag creation on main push" | ||
git push origin "v${{ steps.commit_sha.outputs.stdout }}" | ||
hub release create -m "Release v${{ steps.commit_sha.outputs.stdout }}" "v${{ steps.commit_sha.outputs.stdout }}" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
curl --request GET "https://jitpack.io/api/builds/settle-finance/java-integration-sdk/${{ github.event.release.tag_name }}" |