Skip to content

Commit

Permalink
🔨 refactoring & testing deprecated set-output
Browse files Browse the repository at this point in the history
  • Loading branch information
Matnabru committed Jul 28, 2023
1 parent 16b67b9 commit c957462
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,23 @@ jobs:
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'

- run: npm install
- run: npm run build --ws --if-present

- name: Check if gei-users version has been updated
id: check-users-version
run: |
CURRENT_VERSION=$(npm show gei-users version)
NEW_VERSION=$(node -p "require('./packages/integrations/gei-users/package.json').version")
if [ "$CURRENT_VERSION" != "$NEW_VERSION" ]
then
echo "::set-output name=updated::true"
echo "users_updated=true" >> $GITHUB_ENV
else
echo "::set-output name=updated::false"
echo "users_updated=false" >> $GITHUB_ENV
fi
- name: Publish gei-users
if: steps.check-users-version.outputs.updated == 'true'
if: env.users_updated == 'true'
run: npm publish -w gei-users --access public --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
Expand All @@ -41,13 +40,13 @@ jobs:
NEW_VERSION=$(node -p "require('./packages/integrations/gei-rest/package.json').version")
if [ "$CURRENT_VERSION" != "$NEW_VERSION" ]
then
echo "::set-output name=updated::true"
echo "rest_updated=true" >> $GITHUB_ENV
else
echo "::set-output name=updated::false"
echo "rest_updated=false" >> $GITHUB_ENV
fi
- name: Publish gei-rest
if: steps.check-rest-version.outputs.updated == 'true'
if: env.rest_updated == 'true'
run: npm publish -w gei-rest --access public --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
Expand All @@ -59,13 +58,13 @@ jobs:
NEW_VERSION=$(node -p "require('./packages/integrations/gei-s3/package.json').version")
if [ "$CURRENT_VERSION" != "$NEW_VERSION" ]
then
echo "::set-output name=updated::true"
echo "s3_updated=true" >> $GITHUB_ENV
else
echo "::set-output name=updated::false"
echo "s3_updated=false" >> $GITHUB_ENV
fi
- name: Publish gei-s3
if: steps.check-s3-version.outputs.updated == 'true'
if: env.s3_updated == 'true'
run: npm publish -w gei-s3 --access public --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
Expand All @@ -77,13 +76,13 @@ jobs:
NEW_VERSION=$(node -p "require('./packages/integrations/gei-crud/package.json').version")
if [ "$CURRENT_VERSION" != "$NEW_VERSION" ]
then
echo "::set-output name=updated::true"
echo "crud_updated=true" >> $GITHUB_ENV
else
echo "::set-output name=updated::false"
echo "crud_updated=false" >> $GITHUB_ENV
fi
- name: Publish gei-crud
if: steps.check-crud-version.outputs.updated == 'true'
if: env.crud_updated == 'true'
run: npm publish -w gei-crud --access public --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
2 changes: 1 addition & 1 deletion packages/integrations/gei-users/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gei-users",
"version": "0.6.7",
"version": "0.6.8",
"description": "Automatically generated by graphql-editor-cli",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit c957462

Please sign in to comment.