Skip to content

Commit

Permalink
Removing auto-rebase action in favour of require updating of branch
Browse files Browse the repository at this point in the history
Signed-off-by: iddevops-bot <getgauge@outlook.com>
  • Loading branch information
gaugebot authored and haroon-sheikh committed Jun 23, 2023
1 parent ee120a9 commit a28fa37
Showing 1 changed file with 63 additions and 30 deletions.
93 changes: 63 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
path: ./deploy

windows-package:
needs: [package]
name: Create windows package
runs-on: windows-latest
steps:
Expand Down Expand Up @@ -69,11 +68,40 @@ jobs:
with:
name: gauge-windows-artifact
path: ./deploy

gauge-version:
name: Upload gauge version
runs-on: ubuntu-latest
needs: [package, windows-package]
env:
GITHUB_TOKEN: '${{ secrets.GAUGEBOT_GITHUB_TOKEN }}'
steps:
- uses: actions/checkout@v2

- uses: actions/download-artifact@v1
with:
name: gauge-non-windows-artifact
path: ./deploy

- name: fetch gauge version
run: |
cd deploy
version=$(ls gauge-*-linux.x86.zip | sed 's/gauge-//' | sed 's/-linux.*//')
if [ -z "$version" ]; then
echo "Gauge version is not set"
exit 1
fi
echo $version > ../version.txt
- name: upload gauge version
uses: actions/upload-artifact@v1
with:
name: gauge-version
path: ./version.txt

github-release:
name: Publish github release
runs-on: ubuntu-latest
needs: [windows-package]
needs: [gauge-version]
env:
GITHUB_TOKEN: '${{ secrets.GAUGEBOT_GITHUB_TOKEN }}'
steps:
Expand All @@ -88,41 +116,46 @@ jobs:
with:
name: gauge-windows-artifact
path: ./deploy

- name: Fetch gauge version
uses: actions/download-artifact@v1
with:
name: gauge-version
path: .

- name: Set gauge version
run: echo "GAUGE_VERSION=`cat version.txt`" >> $GITHUB_ENV

- name: update release note
run: |
echo "---------------------------"
echo "Creating release v$version"
echo "---------------------------"
cd deploy
version=$(ls gauge-*-linux.x86.zip | sed 's/gauge-//' | sed 's/-linux.*//')
if [ -z "$version" ]; then
echo "Gauge version is not set"
exit 1
fi
echo -e "Gauge v$version\n\n" > desc.txt
echo -e "Gauge v$GAUGE_VERSION\n\n" > desc.txt
release_description=$(ruby -e "$(curl -sSfL https://github.com/getgauge/gauge/raw/master/build/create_release_text.rb)" getgauge gauge)
echo "$release_description" >> desc.txt
echo "Creating new draft for release v$version"
hub release create -F ./desc.txt "v$version"
echo "Start uploading artifacts"
for artifact in `ls gauge-*`; do
hub release edit -m "" -a $artifact v$version
done
cat desc.txt
echo "Creating new draft for release v$GAUGE_VERSION"
hub release create -F ./desc.txt "v$GAUGE_VERSION"
rm -rf desc.txt
sleep 10
echo $version > ../version.txt
echo "---------------------------"
echo "Uploading artifacts"
echo "---------------------------"
- name: upload gauge version
uses: actions/upload-artifact@v1
with:
name: gauge-version
path: ./version.txt
for artifact in `ls gauge-*`; do
echo $artifact
hub release edit -m "" -a $artifact v$GAUGE_VERSION
if [ $? -ne 0 ]; then
exit 1
fi
done
pypi-release:
runs-on: ubuntu-latest
needs: [github-release]
needs: [gauge-version]
steps:
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow
Expand Down Expand Up @@ -155,8 +188,8 @@ jobs:
python -m twine upload -u $PYPI_USER -p $PYPI_PASSWORD $gauge_package
npm-release:
needs: [github-release]
runs-on: ubuntu-latest
needs: [gauge-version]
steps:
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow
Expand Down Expand Up @@ -189,8 +222,8 @@ jobs:
npm publish --access=public
choco-release:
needs: [github-release]
runs-on: windows-latest
runs-on: ubuntu-latest
needs: [gauge-version]
steps:
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow
Expand Down Expand Up @@ -221,8 +254,8 @@ jobs:
choco push "gauge.$Env:GAUGE_VERSION.nupkg" --apikey=$Env:API_KEY --source=https://push.chocolatey.org/
brew-release:
needs: [github-release]
runs-on: ubuntu-latest
needs: [gauge-version]
steps:
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow
Expand Down

0 comments on commit a28fa37

Please sign in to comment.