Skip to content

Commit

Permalink
Merge pull request #15 from settle-finance/workflow
Browse files Browse the repository at this point in the history
Update Workflow
  • Loading branch information
sharansalian authored May 10, 2024
2 parents 211168e + b481822 commit b9af85d
Showing 1 changed file with 8 additions and 23 deletions.
31 changes: 8 additions & 23 deletions .github/workflows/on_merge_main.yml
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 }}"

0 comments on commit b9af85d

Please sign in to comment.