@@ -3,7 +3,7 @@ name: Build and Release
33on :
44 push :
55 tags :
6- - ' v *'
6+ - ' *'
77
88 workflow_dispatch :
99 inputs :
3535 outputs :
3636 should_deploy : ${{ steps.buildvars.outputs.should_deploy }}
3737 pkg_version : ${{ steps.buildvars.outputs.pkg_version }}
38- pkg_version_strict : ${{ steps.buildvars.outputs.pkg_version_strict }}
3938
4039 steps :
4140 - uses : actions/checkout@v2
5756
5857 - name : Set Next Version Env Var
5958 if : ${{ github.event.inputs.publish == 'true' || github.event.inputs.dryrun == 'true' }}
60- env :
61- NEXT_VERSION : ${{ steps.semver.outputs.next }}
6259 run : |
63- echo "NEXT_VERSION=$next " >> $GITHUB_ENV
60+ echo "NEXT_VERSION=$nextStrict " >> $GITHUB_ENV
6461
6562 - name : Create Draft Release
6663 uses : ncipollo/release-action@v1
@@ -81,19 +78,16 @@ jobs:
8178 echo "Using AUTO SEMVER mode: $NEXT_VERSION"
8279 echo "::set-output name=should_deploy::true"
8380 echo "::set-output name=pkg_version::$NEXT_VERSION"
84- echo "::set-output name=pkg_version_strict::${NEXT_VERSION#?}"
8581 echo "::notice::Release $NEXT_VERSION created using branch $GITHUB_REF_NAME"
86- elif [[ "$GITHUB_REF" =~ ^refs/tags/v * ]]; then
82+ elif [[ "$GITHUB_REF" =~ ^refs/tags/* ]]; then
8783 echo "Using TAG mode: $GITHUB_REF_NAME"
8884 echo "::set-output name=should_deploy::true"
8985 echo "::set-output name=pkg_version::$GITHUB_REF_NAME"
90- echo "::set-output name=pkg_version_strict::${GITHUB_REF_NAME#?}"
9186 echo "::notice::Release $GITHUB_REF_NAME created using tag $GITHUB_REF_NAME"
9287 else
93- echo "Using TEST mode: v8 .0.0-dev.$GITHUB_RUN_NUMBER"
88+ echo "Using TEST mode: 8 .0.0-dev.$GITHUB_RUN_NUMBER"
9489 echo "::set-output name=should_deploy::false"
95- echo "::set-output name=pkg_version::v8.0.0-dev.$GITHUB_RUN_NUMBER"
96- echo "::set-output name=pkg_version_strict::8.0.0-dev.$GITHUB_RUN_NUMBER"
90+ echo "::set-output name=pkg_version::8.0.0-dev.$GITHUB_RUN_NUMBER"
9791 echo "::notice::Non-production build 8.0.0-dev.$GITHUB_RUN_NUMBER created using branch $GITHUB_REF_NAME"
9892 fi
9993
@@ -166,7 +160,6 @@ jobs:
166160 env :
167161 SHOULD_DEPLOY : ${{needs.prepare.outputs.should_deploy}}
168162 PKG_VERSION : ${{needs.prepare.outputs.pkg_version}}
169- PKG_VERSION_STRICT : ${{needs.prepare.outputs.pkg_version_strict}}
170163
171164 steps :
172165 - uses : actions/checkout@v2
@@ -194,14 +187,13 @@ jobs:
194187 DEBIAN_FRONTEND : noninteractive
195188 run : |
196189 echo "PKG_VERSION: $PKG_VERSION"
197- echo "PKG_VERSION_STRICT: $PKG_VERSION_STRICT"
198190 echo "GITHUB_SHA: $GITHUB_SHA"
199191 echo "GITHUB_REF_NAME: $GITHUB_REF_NAME"
200192 echo "Running build script..."
201193 chmod +x ./dev/deploy/build.sh
202194 sh ./dev/deploy/build.sh
203- echo "Setting version $PKG_VERSION_STRICT ..."
204- sed -i -r -e "s|^__version__ += '.*'$|__version__ = '$PKG_VERSION_STRICT '|" ietf/__init__.py
195+ echo "Setting version $PKG_VERSION ..."
196+ sed -i -r -e "s|^__version__ += '.*'$|__version__ = '$PKG_VERSION '|" ietf/__init__.py
205197 sed -i -r -e "s|^__release_hash__ += '.*'$|__release_hash__ = '$GITHUB_SHA'|" ietf/__init__.py
206198 sed -i -r -e "s|^__release_branch__ += '.*'$|__release_branch__ = '$GITHUB_REF_NAME'|" ietf/__init__.py
207199
0 commit comments