Skip to content

fix: add run?

fix: add run? #8

name: Publish Package to npmjs
on:
release:
types: [released]
workflow_dispatch:
input:
tag:
descript: 'NPM version'
required: true
type: string
push:
branches:
- chore/contract-publishing
jobs:
publish:
runs-on: ['self-hosted', 'org', 'npm-publish']
permissions:
contents: write
id-token: write
repository-projects: read
steps:
- uses: actions/checkout@v4
- name: Akeyless Get Secrets
id: get_auth_token
uses: docker://us-west1-docker.pkg.dev/devopsre/akeyless-public/akeyless-action:latest
with:
api-url: https://api.gateway.akeyless.celo-networks-dev.org
# this access-id needs to change whenever devops gives em
access-id: p-kf9vjzruht6l
static-secrets: '{"/static-secrets/apps-tooling-circle/npm-publish-token":"NPM_TOKEN"}'
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
scope: '@celo'
- name: 'Setup yarn'
shell: bash
run: |
npm install --global yarn
source ~/.bashrc
- name: 'Install packages'
run: yarn
- name: 'Check if a release should be published'
run: npm run is_contract_release $GITHUB_TAG >> "$GITHUB_ENV"
env:
GITHUB_TAG: ${{ github.ref_name }}
- if: ${{ env.RELEASE_VERSION != '' }}
name: 'Compile solidity contracts and typescript files'
run: yarn build && npm run prepare_contracts_and_abis_publishing
env:
RELEASE_TYPE: ${{ env.RELEASE_TYPE }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
- if: ${{ env.RELEASE_VERSION != '' }}
name: Publish @celo/contracts
run: yarn publish contracts --tag latest --version $RELEASE_VERSION --no-git-tag-version --dry-run
env:
RELEASE_TYPE: ${{ env.RELEASE_TYPE }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
NPM_TOKEN: ${{ env.NPM_TOKEN }}
- if: ${{ env.RELEASE_VERSION != '' }}
name: Publish @celo/abis
run: yarn publish build/contracts --tag latest --version $RELEASE_VERSION --no-git-tag-version --dry-run
env:
RELEASE_TYPE: ${{ env.RELEASE_TYPE }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
NPM_TOKEN: ${{ env.NPM_TOKEN }}