Skip to content

Commit

Permalink
corrects the runs-on for windows choco release (#2381)
Browse files Browse the repository at this point in the history
  • Loading branch information
haroon-sheikh authored Jul 20, 2023
1 parent 739b426 commit 42b8eb0
Showing 1 changed file with 153 additions and 153 deletions.
306 changes: 153 additions & 153 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,132 +97,132 @@ jobs:
name: gauge-version
path: ./version.txt

github-release:
runs-on: ubuntu-latest
needs: [gauge-version]
env:
GITHUB_TOKEN: '${{ secrets.GAUGEBOT_GITHUB_TOKEN }}'
steps:
- uses: actions/checkout@v3

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

- uses: actions/download-artifact@v3
with:
name: gauge-windows-artifact
path: ./deploy
- name: Fetch gauge version
uses: actions/download-artifact@v3
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
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$GAUGE_VERSION"
hub release create -F ./desc.txt "v$GAUGE_VERSION"
rm -rf desc.txt
sleep 10
echo "---------------------------"
echo "Uploading artifacts"
echo "---------------------------"
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: [gauge-version]
steps:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies

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

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

- name: Deploy to pypi
env:
PYPI_USER: ${{ secrets.PYPI_USER }}
GAUGE_PACKAGE_NAME: getgauge-cli
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
cd build/pip
pip install -r requirements.txt
python build.py --dist
gauge_package=`ls dist/$GAUGE_PACKAGE_NAME-$GAUGE_VERSION.tar.gz`
python -m twine upload -u $PYPI_USER -p $PYPI_PASSWORD $gauge_package
npm-release:
runs-on: ubuntu-latest
needs: [gauge-version]
steps:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: 'build/npm/package-lock.json'
registry-url: 'https://registry.npmjs.org'

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

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

- name: Setup Git User
run: |
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
- name: Deploy npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd build/npm
npm version $GAUGE_VERSION
npm publish --access=public
# github-release:
# runs-on: ubuntu-latest
# needs: [gauge-version]
# env:
# GITHUB_TOKEN: '${{ secrets.GAUGEBOT_GITHUB_TOKEN }}'
# steps:
# - uses: actions/checkout@v3
#
# - uses: actions/download-artifact@v3
# with:
# name: gauge-non-windows-artifact
# path: ./deploy
#
# - uses: actions/download-artifact@v3
# with:
# name: gauge-windows-artifact
# path: ./deploy
#
# - name: Fetch gauge version
# uses: actions/download-artifact@v3
# 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
# 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$GAUGE_VERSION"
# hub release create -F ./desc.txt "v$GAUGE_VERSION"
# rm -rf desc.txt
# sleep 10
#
# echo "---------------------------"
# echo "Uploading artifacts"
# echo "---------------------------"
#
# 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: [gauge-version]
# steps:
# - uses: actions/checkout@v3
# - run: git fetch --prune --unshallow
#
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# cache: 'pip' # caching pip dependencies
#
# - name: Fetch gauge version
# uses: actions/download-artifact@v3
# with:
# name: gauge-version
# path: .
#
# - name: Set gauge version
# run: echo "GAUGE_VERSION=`cat version.txt`" >> $GITHUB_ENV
#
# - name: Deploy to pypi
# env:
# PYPI_USER: ${{ secrets.PYPI_USER }}
# GAUGE_PACKAGE_NAME: getgauge-cli
# PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: |
# cd build/pip
# pip install -r requirements.txt
# python build.py --dist
# gauge_package=`ls dist/$GAUGE_PACKAGE_NAME-$GAUGE_VERSION.tar.gz`
# python -m twine upload -u $PYPI_USER -p $PYPI_PASSWORD $gauge_package
#
# npm-release:
# runs-on: ubuntu-latest
# needs: [gauge-version]
# steps:
# - uses: actions/checkout@v3
# - run: git fetch --prune --unshallow
#
# - uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: 'npm'
# cache-dependency-path: 'build/npm/package-lock.json'
# registry-url: 'https://registry.npmjs.org'
#
# - name: Fetch gauge version
# uses: actions/download-artifact@v3
# with:
# name: gauge-version
# path: .
#
# - name: Set gauge version
# run: echo "GAUGE_VERSION=`cat version.txt`" >> $GITHUB_ENV
#
# - name: Setup Git User
# run: |
# git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
# git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
#
# - name: Deploy npm
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: |
# cd build/npm
# npm version $GAUGE_VERSION
# npm publish --access=public

choco-release:
runs-on: ubuntu-latest
runs-on: windows-latest
needs: [gauge-version]
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -253,32 +253,32 @@ jobs:
./package.ps1
choco push "gauge.$Env:GAUGE_VERSION.nupkg" --apikey=$Env:API_KEY --source=https://push.chocolatey.org/
brew-release:
runs-on: ubuntu-latest
needs: [gauge-version]
steps:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- name: Set up Ruby 3.1.4
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.4

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

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

- name: Update brew formula
env:
HOMEBREW_GITHUB_USER_NAME: ${{ secrets.HOMEBREW_GITHUB_USER_NAME }}
HOMEBREW_GITHUB_USER_EMAIL: ${{ secrets.HOMEBREW_GITHUB_USER_EMAIL }}
GITHUB_TOKEN: ${{ secrets.GAUGEBOT_GITHUB_TOKEN }}
run: |
cd build/brew
bash create_brew_pr.sh
# brew-release:
# runs-on: ubuntu-latest
# needs: [gauge-version]
# steps:
# - uses: actions/checkout@v3
# - run: git fetch --prune --unshallow
#
# - name: Set up Ruby 3.1.4
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: 3.1.4
#
# - name: Fetch gauge version
# uses: actions/download-artifact@v3
# with:
# name: gauge-version
# path: .
#
# - name: Set gauge version
# run: echo "GAUGE_VERSION=`cat version.txt`" >> $GITHUB_ENV
#
# - name: Update brew formula
# env:
# HOMEBREW_GITHUB_USER_NAME: ${{ secrets.HOMEBREW_GITHUB_USER_NAME }}
# HOMEBREW_GITHUB_USER_EMAIL: ${{ secrets.HOMEBREW_GITHUB_USER_EMAIL }}
# GITHUB_TOKEN: ${{ secrets.GAUGEBOT_GITHUB_TOKEN }}
# run: |
# cd build/brew
# bash create_brew_pr.sh

0 comments on commit 42b8eb0

Please sign in to comment.