Skip to content

Commit

Permalink
Merge pull request #37 from DanMad/develop
Browse files Browse the repository at this point in the history
Updated env variables in Workflows
  • Loading branch information
DanMad authored Jul 21, 2021
2 parents f5c09fe + 657f054 commit 1bc406b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 8 additions & 1 deletion .github/create-github-release
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/bin/sh

PACKAGE_VERSION=$(cat package.json | jq -r .version)
PAYLOAD="{ \"tag_name\": \"v${PACKAGE_VERSION}\", \"target_commitish\": \"${GITHUB_SHA}\", \"name\": \"v${PACKAGE_VERSION}\", \"body\": \"Release Version ${PACKAGE_VERSION}\", \"draft\": false, \"prerelease\": false }"
PAYLOAD="{ \
\"tag_name\": \"v${PACKAGE_VERSION}\", \
\"target_commitish\": \"${GITHUB_SHA}\", \
\"name\": \"v${PACKAGE_VERSION}\", \"body\": \
\"Release Version ${PACKAGE_VERSION}\", \
\"draft\": false, \
\"prerelease\": false \
}"
GITHUB_ENDPOINT="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases"
GITHUB_ENDPOINT_STATUS=$(curl -H "Content-Type:application/json" $GITHUB_ENDPOINT -o /dev/null -w '%{http_code}\n' -d "${PAYLOAD}" -sH "Authorization: token ${GITHUB_TOKEN}")

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/main-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: Push (main)

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

on:
push:
Expand Down Expand Up @@ -39,6 +40,3 @@ jobs:
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn publish
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "on-the-case",
"version": "1.1.6",
"version": "1.1.7",
"description": "A module that extends JavaScript's String object with additional case-conversion support",
"homepage": "https://www.npmjs.com/package/on-the-case",
"bugs": "https://github.com/DanMad/on-the-case/issues",
Expand Down

0 comments on commit 1bc406b

Please sign in to comment.