Skip to content

Commit

Permalink
fix: Correct yml files
Browse files Browse the repository at this point in the history
  • Loading branch information
burkido committed Aug 15, 2024
1 parent 2655b26 commit 5f54d2b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 88 deletions.
44 changes: 36 additions & 8 deletions .github/workflows/main-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main Workflow
name: Create new tag and release on push to jitpack-cd branch

on:
push:
Expand All @@ -9,18 +9,46 @@ permissions:
contents: write

jobs:
independent-job:
create-new-tag-and-release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Print message
run: echo "This is an independent job"

handle-new-tag:
uses: ./.github/workflows/new-tag.yml
- name: Get next version
id: get_next_version
uses: thenativeweb/get-next-version@2.6.2

- name: Check for existing tag
id: check_tag
run: |
if git rev-parse "refs/tags/${{ steps.get_next_version.outputs.version }}" >/dev/null 2>&1; then
echo "Tag already exists"
exit 1
fi
- name: Push new tag
if: ${{ steps.get_next_version.outputs.hasNextVersion == 'true' && steps.check_tag.outcome != 'failure' }}
run: |
git tag ${{ steps.get_next_version.outputs.version }}
git push origin ${{ steps.get_next_version.outputs.version }}
handle-new-release:
uses: ./.github/workflows/new-release.yml
- name: Read release body from file
id: read_release_body
run: |
echo "RELEASE_BODY=$(cat release-notes.txt)" >> $GITHUB_ENV
- name: Create GitHub Release
if: ${{ steps.get_next_version.outputs.hasNextVersion == 'true' && steps.check_tag.outcome != 'failure' }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_next_version.outputs.version }}
release_name: 'Auto OTP Reader ${{ steps.get_next_version.outputs.version }}'
body: ${{ env.RELEASE_BODY }}
draft: false
prerelease: false
42 changes: 0 additions & 42 deletions .github/workflows/new-release.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/new-tag.yml

This file was deleted.

0 comments on commit 5f54d2b

Please sign in to comment.