Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add runnable workflow for core contracts #212

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
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
58 changes: 47 additions & 11 deletions .github/workflows/fhevm-core-contracts-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: Publish fhEVM Solidity core contracts release
name: Publish fhEVM Solidity core contracts

on:
release:
types: [released]
workflow_dispatch:
inputs:
release:
description: "Set to true for release tagging"
required: false
default: false

jobs:
publish:
Expand All @@ -11,18 +15,50 @@ jobs:
run:
working-directory: ./contracts
permissions:
id-token: "write"
contents: read
id-token: write
packages: write
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
- name: Check out repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Set up Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20.x
- run: cp .env.example.deployment .env
- run: npm ci --include=optional
- run: npm run compile
- run: npm run compile:gateway
- uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1

- name: Prepare environment file
run: cp .env.example.deployment .env

- name: Install dependencies
run: npm ci --include=optional

- name: Compile contracts
run: npm run compile

- name: Compile gateway
run: npm run compile:gateway

- name: Publish to npm
uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1
with:
package: ./contracts/package.json
token: ${{ secrets.NPM_TOKEN }}
provenance: true

- name: Publish prerelease to npm
if: ${{ inputs.release != 'true' }}
uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1
with:
package: ./contracts/package.json
tag: prerelease
token: ${{ secrets.NPM_TOKEN }}
provenance: true

- name: Publish release to npm
if: ${{ inputs.release == 'true' }}
uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1
with:
package: ./contracts/package.json
token: ${{ secrets.NPM_TOKEN }}
provenance: true
29 changes: 0 additions & 29 deletions .github/workflows/fhevm-core-contracts-publishprerelease.yml

This file was deleted.

Loading