add git push to artifacts #5
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: "Prepare Artifacts" | ||
on: | ||
workflow_call: | ||
jobs: | ||
permissions: | ||
# Give the default GITHUB_TOKEN write permission to commit and push the | ||
# added or changed files to the repository. | ||
contents: write | ||
forge-artifacts: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v4" | ||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
- name: "Install NodeJS" | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
with: | ||
version: 9.0.6 | ||
run_install: false | ||
- name: "Install the Node.js dependencies" | ||
run: "pnpm install" | ||
- name: "Prepare the contract artifacts" | ||
run: "./shell/prepare-artifacts.sh" | ||
- name: "Store the contract artifacts in CI" | ||
uses: "actions/upload-artifact@v4" | ||
with: | ||
name: "contract-artifacts" | ||
path: "artifacts" | ||
- name: "Commit and push artifact" | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
- name: "Add summary" | ||
run: | | ||
echo "## Build result" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY |