Update repository URL in package.json #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: Daily Build and Publish | ||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Runs at 00:00 UTC every day | ||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
environment: prod # Specify the environment here | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Fetches all history for all tags and branches | ||
token: ${{ secrets.MY_PERSONAL_TOKEN }} # Use the renamed PAT here | ||
ssh-strict: true | ||
persist-credentials: true | ||
clean: true | ||
lfs: false | ||
submodules: false | ||
set-safe-directory: true | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' # Specify your Node.js version | ||
registry-url: 'https://registry.npmjs.org/' | ||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
- name: Install Dependencies | ||
run: pnpm install | ||
- name: Update Contracts | ||
run: pnpm update-contracts | ||
- name: Format | ||
run: pnpm format | ||
- name: Check for changes | ||
id: git-check | ||
run: | | ||
git diff --quiet && git diff --staged --quiet || echo "::set-output name=changes_detected::true" | ||
- name: Increment package version | ||
if: steps.git-check.outputs.changes_detected == 'true' | ||
run: | | ||
npm version patch --no-git-tag-version | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
- name: Commit and Push | ||
if: steps.git-check.outputs.changes_detected == 'true' | ||
run: | | ||
git config --global user.name 'alexx855' | ||
git config --global user.email '[email protected]' | ||
git add . | ||
git commit -m "Automated update" -a || echo "No changes to commit" | ||
git push | ||
- name: Publish to npm | ||
if: steps.git-check.outputs.changes_detected == 'true' | ||
run: pnpm upload | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |