Skip to content

Deploy to NPM

Deploy to NPM #47

Workflow file for this run

name: Deploy to NPM
on:
workflow_dispatch:
env:
BRANCH_NAME: version-bump-${{ github.run_id }}${{ github.run_attempt }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v4
with:
git_user_signingkey: true
git_commit_gpgsign: true
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- run: |
git config --global user.email [email protected]
git config --global user.name tna-da-bot
git checkout -b $BRANCH_NAME
git push -u origin $BRANCH_NAME
- run: |
./.github/scripts/deploy_npm.sh ${{ secrets.NPM_TOKEN }}
id: deploy-npm
- name: Create Pull Request
run: gh pr create --label 'Version bump' -t "Version bump ${{ steps.deploy-npm.outputs.set-npm-version }}" -b "Version bump ${{ steps.deploy-npm.outputs.set-npm-version }}"
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_PAT }}
- name: Send success message
uses: nationalarchives/tdr-github-actions/.github/actions/slack-send@main
with:
message: ":white_check_mark: TDR Components ${{ steps.deploy-npm.outputs.set-npm-version }} has been published to npm"
slack-url: ${{ secrets.SLACK_WEBHOOK }}