Skip to content

Commit

Permalink
Updated GitHub Action release workflow (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
vhadianto authored Nov 29, 2023
1 parent d85027c commit 7ee30f1
Showing 1 changed file with 9 additions and 20 deletions.
29 changes: 9 additions & 20 deletions .github/workflows/flowpipe-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
version:
description: 'Version'
required: true
default: 0.0.\invalid
default: 0.1.0
confirmMain:
description: Confirm running on main branch
required: true
Expand All @@ -24,11 +24,9 @@ env:
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}

jobs:
create_release_tag:
name: Tag Release
build_and_release:
name: Build and Release Flowpipe
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.calculate_version.outputs.VERSION }}
steps:
- name: validate
if: github.ref == 'refs/heads/main'
Expand All @@ -45,10 +43,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
path: flowpipe
ref: ${{ github.event.ref }}

- name: Unshallow
run: git fetch --prune --unshallow
# - name: Unshallow
# run: git fetch --prune --unshallow

- name: Calculate version
id: calculate_version
Expand All @@ -57,26 +56,16 @@ jobs:
echo "VERSION=${{ github.event.inputs.version }}-beta.$(date +'%Y%m%d%H%M')" >> $GITHUB_ENV
else
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
fi
- name: Tag Release
run: |
cd flowpipe
git config user.name "Flowpipe GitHub Actions Bot"
git config user.email [email protected]
git tag $VERSION
git push origin $VERSION
build_and_release:
name: Release
needs: create_release_tag
runs-on: ubuntu-latest
steps:

- name: Checkout Flowpipe repository
uses: actions/checkout@v3
with:
path: flowpipe
ref: ${{ needs.create_release_tag.outputs.VERSION }}

- name: Checkout Flowpipe SDK Go repository
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -112,4 +101,4 @@ jobs:
workdir: flowpipe
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
VERSION: ${{ needs.create_release_tag.outputs.VERSION }}
VERSION: $VERSION

0 comments on commit 7ee30f1

Please sign in to comment.