Skip to content

Commit

Permalink
Migrate to GITHUB_OUTPUT
Browse files Browse the repository at this point in the history
  • Loading branch information
adhamu committed Jan 13, 2023
1 parent b62d49d commit 55c8da1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

- name: Set Environment Variables
run: |
echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
echo ::set-output name=CURRENT_VERSION::$(cat package.json | jq -r '.version')
echo ::set-output name=PUBLISHED_VERSION::$(npm view arge version)
echo ::set-output name=BRANCH::${GITHUB_REF##*/}
echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
echo "NEW_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_OUTPUT
echo "PUBLISHED_VERSION=$(npm view arge version)" >> $GITHUB_OUTPUT
echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
id: env_vars

- name: Install Node.js ${{ steps.env_vars.outputs.NODE_VERSION }}
Expand Down Expand Up @@ -63,15 +63,15 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
tag_name: ${{ steps.env_vars.outputs.CURRENT_VERSION }}
release_name: ${{ steps.env_vars.outputs.CURRENT_VERSION }}
body: "**Full Changelog**: https://github.com/adhamu/arge/compare/${{ steps.env_vars.outputs.PUBLISHED_VERSION }}...${{ steps.env_vars.outputs.CURRENT_VERSION }}"
tag_name: ${{ steps.env_vars.outputs.NEW_VERSION }}
release_name: ${{ steps.env_vars.outputs.NEW_VERSION }}
body: "**Full Changelog**: https://github.com/adhamu/arge/compare/${{ steps.env_vars.outputs.PUBLISHED_VERSION }}...${{ steps.env_vars.outputs.NEW_VERSION }}"
draft: false
prerelease: false

- name: Publish to Registry
run: |
pkg_version=${{ steps.env_vars.outputs.CURRENT_VERSION }}
pkg_version=${{ steps.env_vars.outputs.NEW_VERSION }}
branch=${{ steps.env_vars.outputs.BRANCH }}
if [[ $branch != "main" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arge",
"version": "1.3.0",
"version": "1.4.0",
"description": "A simple utility to parse command line arguments and flags",
"keywords": [
"argv",
Expand Down

0 comments on commit 55c8da1

Please sign in to comment.