Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners-nr committed Feb 28, 2024
1 parent a4b773f commit e33a24c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 59 deletions.
108 changes: 50 additions & 58 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,6 @@ jobs:
name: npm-module
path: newrelic-native-metrics-${{ env.PKG_VERSION }}.tgz

test_var:
runs-on: ubuntu-latest
steps:
- run: echo "not a dry run"
if: ${{ inputs.dry_run == false }}
- run: echo "is a dry run"
if: ${{ inputs.dry_run == true }}

# Our typical flow looks like:
# 1. prepare-release workflow
# 2. create-release workflow
Expand All @@ -190,53 +182,53 @@ jobs:
#
# Given that, we need to replicate all of our create-release steps inline
# here.
# tag_release:
# if: ${{ input.dry_run == false }}
# needs: [ package ]
# runs-on: ubuntu-latest
# name: Tag Release
# steps:
# - uses: actions/checkout@v4
# # We need access to the prep scripts in the node-newrelic repo.
# - uses: actions/checkout@v4
# with:
# repository: newrelic/node-newrelic
# path: agent-repo
# - uses: actions/setup-node@v4
# - run: |
# # Install agent-repo dependencies.
# npm ci --prefix agent-repo
# - name: Configure GitHub Credentials
# run: |
# git config user.name ${GITHUB_ACTOR}
# git config user.email gh-actions-${GITHUB_ACTOR}@github.com
# - name: Create Release Tag
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# node ./agent-repo/bin/create-release-tag.js --branch ${{ github.ref }} --repo ${{ github.repository }} --workflows test.yml,prepare-release.yml
# - name: Get Created Tag
# id: get_tag
# run: echo "latest_tag=$(git describe --tags --abbrev=0)" >> ${GITHUB_OUTPUT}
# - name: Create GitHub Release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# node ./agent-repo/bin/create-github-release.js --tag ${{ steps.get_tag.outputs.latest_tag }} --repo ${{ github.repository }} --changelog ${{ inputs.changelog_file }}
#
# publish:
# if: ${{ input.dry_run == false }}
# needs: [ tag_release ]
# runs-on: ubuntu-latest
# name: Publish Package
# steps:
# - uses: actions/setup-node@v4
# with:
# registry-url: 'https://registry.npmjs.org'
# - uses: actions/download-artifact@v4
# with:
# name: npm-module
# - run: echo -e "PKG_NAME=$(ls -1A *.tgz | head -n 1)" >> "$GITHUB_ENV"
# - run: npm publish --access=public ${PKG_NAME}
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
tag_release:
if: ${{ inputs.dry_run == false }}
needs: [ package ]
runs-on: ubuntu-latest
name: Tag Release
steps:
- uses: actions/checkout@v4
# We need access to the prep scripts in the node-newrelic repo.
- uses: actions/checkout@v4
with:
repository: newrelic/node-newrelic
path: agent-repo
- uses: actions/setup-node@v4
- run: |
# Install agent-repo dependencies.
npm ci --prefix agent-repo
- name: Configure GitHub Credentials
run: |
git config user.name ${GITHUB_ACTOR}
git config user.email gh-actions-${GITHUB_ACTOR}@github.com
- name: Create Release Tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
node ./agent-repo/bin/create-release-tag.js --branch ${{ github.ref }} --repo ${{ github.repository }} --workflows test.yml,prepare-release.yml
- name: Get Created Tag
id: get_tag
run: echo "latest_tag=$(git describe --tags --abbrev=0)" >> ${GITHUB_OUTPUT}
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
node ./agent-repo/bin/create-github-release.js --tag ${{ steps.get_tag.outputs.latest_tag }} --repo ${{ github.repository }} --changelog ${{ inputs.changelog_file }}
publish:
if: ${{ inputs.dry_run == false }}
needs: [ tag_release ]
runs-on: ubuntu-latest
name: Publish Package
steps:
- uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
- uses: actions/download-artifact@v4
with:
name: npm-module
- run: echo -e "PKG_NAME=$(ls -1A *.tgz | head -n 1)" >> "$GITHUB_ENV"
- run: npm publish --access=public ${PKG_NAME}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"native": "node tests/native/*.js",
"test": "npm run unit && npm run integration",
"install": "node-gyp-build",
"prepare": "husky install",
"prepare": "husky install || true",
"third-party-updates": "oss third-party manifest && oss third-party notices && git add THIRD_PARTY_NOTICES.md third_party_manifest.json"
},
"repository": {
Expand Down

0 comments on commit e33a24c

Please sign in to comment.