Skip to content

fix: constant name @ton/test-utils in require (#139) #51

fix: constant name @ton/test-utils in require (#139)

fix: constant name @ton/test-utils in require (#139) #51

Workflow file for this run

on:
push:
branches:
- develop
name: Publish to NPM
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
environment: dev
if: github.repository == 'ton-org/sandbox'
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: '18.x'
always-auth: true
- name: Install Yarn
run: npm install -g yarn
- name: Bump version
id: version
run: |
CURRENT_VERSION=$(jq -r '.version' package.json)
BASE_VERSION=$(echo $CURRENT_VERSION | cut -d '-' -f 1)
NEW_BASE=$(echo $BASE_VERSION | awk -v OFS='.' -F. '{
$2 = $2 + 1;
$3 = 0;
print $0
}')
TIMESTAMP=$(date -u +"%Y%m%d%H%M%S")
COMMIT_SHA=$(git rev-parse --short HEAD)
NEW_VERSION="${NEW_BASE}-dev.${TIMESTAMP}.${COMMIT_SHA}"
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
- name: Update package.json version
run: |
jq ".version = \"${{ steps.version.outputs.new_version }}\"" package.json > package.tmp
mv package.tmp package.json
- name: Install dependencies
run: yarn
- name: Run tests
run: yarn test
- name: Build
run: yarn build
- name: Setup .yarnrc.yml
run: |
yarn config set npmAuthToken $NPM_AUTH_TOKEN
yarn config set npmAlwaysAuth true
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Publish
run: yarn npm publish --access public --tag dev