Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/npm-dist-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Set npm dist-tag

on:
workflow_dispatch:
inputs:
version:
description: 'Version to tag (e.g. 5.6.0-rc.1)'
required: true
type: string
tag:
description: 'dist-tag to set'
required: true
default: latest
type: string

jobs:
dist-tag:
name: Tag ${{ inputs.version }} as ${{ inputs.tag }}
environment: npm
runs-on: ubuntu-latest
steps:
- name: Authenticate to npm
# Intentionally escape $ to avoid interpolation and writing the token to disk
run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
Comment thread
tirumerla marked this conversation as resolved.
- name: Set dist-tag on both packages
run: |
npm dist-tag add "@openzeppelin/tron-contracts@$VERSION" "$TAG"
npm dist-tag add "@openzeppelin/tron-contracts-upgradeable@$VERSION" "$TAG"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
VERSION: ${{ inputs.version }}
TAG: ${{ inputs.tag }}
Loading