Merge pull request #163 from tokamak-network/OR-2006_change-geth-script #38
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish the Titan Packages | |
on: | |
push: | |
tags: | |
- 'release-*' | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Setup Node 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Install Dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build | |
run: yarn build | |
- name: Create .npmrc | |
run: | | |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > .npmrc | |
- name: Filter packages to publish | |
id: filter-packages | |
run: | | |
# Define the package names to publish | |
PACKAGES_TO_PUBLISH=("@tokamak-network/titan-sdk @tokamak-network/titan-contracts") | |
# Set the output variables for packages to publish | |
echo "::set-output name=packages-to-publish::${PACKAGES_TO_PUBLISH[*]}" | |
- name: Publish Packages | |
run: | | |
for PACKAGE in ${{ steps.filter-packages.outputs.packages-to-publish }}; do | |
echo "Publishing $PACKAGE" | |
if yarn workspace $PACKAGE publish; then | |
echo "Package $PACKAGE published successfully!" | |
else | |
echo "Skipping package $PACKAGE publishing as it encountered an error." | |
fi | |
done | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |