Skip to content

Merge pull request #835 from magiclabs/PDEEXP-2014-add-kadena-methods… #260

Merge pull request #835 from magiclabs/PDEEXP-2014-add-kadena-methods…

Merge pull request #835 from magiclabs/PDEEXP-2014-add-kadena-methods… #260

Workflow file for this run

name: Publish
on:
push:
branches:
- "master"
env:
GITHUB_TOKEN: ${{ secrets.ARI_ADMIN_PAT_TOKEN }}
GH_TOKEN: ${{ secrets.ARI_ADMIN_PAT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
jobs:
build:
runs-on: ubuntu-20.04
name: Build
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ARI_ADMIN_PAT_TOKEN }}
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'
- name: Install dependencies
run: |
yarn -v
yarn install --immutable
- name: Apply semver updates (if any)
run: |
if yarn auto version; then
AUTO_VERSION=$(yarn auto version)
echo "Auto Version: $AUTO_VERSION"
if [[ $AUTO_VERSION == pre* ]]; then
yarn lerna version "$AUTO_VERSION" --no-git-tag-version --no-push --yes --preid "$GITHUB_REF"
elif [[ $AUTO_VERSION ]]; then
yarn lerna version "$AUTO_VERSION" --no-git-tag-version --no-push --yes
fi
else
echo "Unable to bump version successfully." && exit 1
fi
- name: Build
run: yarn build
- name: Upload Build Results
uses: actions/upload-artifact@v3
with:
name: build-output
path: |
packages/@magic-ext/*/dist
packages/@magic-sdk/*/dist
packages/*/dist
publish:
runs-on: ubuntu-20.04
name: Publish
permissions:
contents: read
id-token: write
needs: build
environment: production
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ARI_ADMIN_PAT_TOKEN }}
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'
- name: Install dependencies
run: |
yarn -v
yarn install --immutable
- name: Download Build Results
uses: actions/download-artifact@v3
with:
name: build-output
path: packages
- name: Create Release
run: yarn auto shipit -vv