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

adding workflow to update dist branch #105

Merged
merged 2 commits into from
Nov 27, 2024
Merged
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
44 changes: 44 additions & 0 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Update dist

on: workflow_dispatch

env:
CI: true

permissions:
contents: write

jobs:
dist:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16]
steps:
- name: Check out chain4travel/caminojs
uses: actions/checkout@v4

- uses: actions/setup-node@v2
with:
cache: yarn
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn prettier-check
- run: yarn test
- run: yarn build

- name: Check out dist caminojs
uses: actions/checkout@v4
with:
ref: dist
path: caminojs-dist

- run: |
rm -rf caminojs-dist/*
cp -ar dist documentation CHANGELOG.md LICENSE README.md package.json tsconfig.json webpack.config.js ./caminojs-dist/
cd caminojs-dist
git config --global user.email "[email protected]"
git config --global user.name "Auto Push"
git add .
git diff --quiet && git diff --staged --quiet || git commit -m "Update dist"
git push origin dist
Loading