Skip to content

Commit

Permalink
modified: .github/workflows/package-release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuval Leibovich committed May 11, 2023
1 parent ac105ec commit d52a9cb
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/package-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ on:
# default: true
push:
tags:
- '*'
- 'v*.*.*'

jobs:
test:
Expand All @@ -47,26 +47,12 @@ jobs:
# TEST_MULTI_ENVIRONMENTS: ${{ inputs.TEST_MULTI_ENVIRONMENTS }}
secrets: inherit

# release:
# needs: test
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Create Release
# uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e
# with:
# tag_name: ${{ steps.tag-calculator.outputs.NEW_TAG }}
# release_name: Release ${{ steps.tag-calculator.outputs.NEW_TAG }}
# draft: false
# prerelease: false

create_release:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -87,11 +73,12 @@ jobs:
run: |
next_version=$((version + 1))
echo "Next version: $next_version"
- name: Set tag name
id: set_tag_name
run: |
tag_name=v$next_version
next_version=$((${{ github.event_name == 'release' }} ? $(echo "${{ github.ref }}" | awk -F'/' '{print $3}') : $(echo "${{ github.ref }}-$(date +%s)" | awk -F'/' '{print $3}')))
tag_name=v$(echo "$next_version" | cut -d'.' -f-3)
echo "::set-output name=tag_name::$tag_name"
continue-on-error: true

Expand Down

0 comments on commit d52a9cb

Please sign in to comment.