Skip to content

Commit

Permalink
Merge pull request #60 from upsetjs/release/v3.2.3
Browse files Browse the repository at this point in the history
Release v3.2.3
  • Loading branch information
sgratzl authored Oct 25, 2024
2 parents d50a9d4 + bf8216d commit 6e93892
Show file tree
Hide file tree
Showing 16 changed files with 3,618 additions and 5,801 deletions.
28 changes: 0 additions & 28 deletions .eslintrc.cjs

This file was deleted.

16 changes: 12 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ on:

jobs:
build:
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm i -g yarn
- run: yarn config set checksumBehavior ignore
- name: Cache Node.js modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
./.yarn/cache
Expand All @@ -27,4 +28,11 @@ jobs:
- run: yarn build
- run: yarn lint
- run: yarn test:coverage
- run: yarn docs
# - run: yarn docs
# - name: Deploy
# if: github.ref == 'refs/heads/master' && github.event_name == 'push'
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs
# enable_jekyll: false
11 changes: 7 additions & 4 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ on:
description: 'Semantic Version Number (i.e., 5.5.0 or patch, minor, major, prepatch, preminor, premajor, prerelease)'
required: true
default: patch
preid:
description: 'Pre Release Identifier (i.e., alpha, beta)'
required: true
default: alpha
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: main
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
Expand All @@ -22,10 +26,9 @@ jobs:
- name: Change version number
id: version
run: |
echo -n "::set-output name=next_tag::"
npm version --no-git-tag-version ${{ github.event.inputs.versionName }}
echo "next_tag=$(npm version --no-git-tag-version ${{ github.event.inputs.versionName }} --preid ${{ github.event.inputs.preid }})" >> $GITHUB_OUTPUT
- name: Create pull request into main
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v7
with:
branch: release/${{ steps.version.outputs.next_tag }}
commit-message: 'chore: release ${{ steps.version.outputs.next_tag }}'
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/dependabot_automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Dependabot auto-merge
on:
pull_request:
branches:
- 'dev' # only into dev

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'sgratzl/cytoscape.js-layers'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Enable auto-merge for Dependabot PRs
# patch only
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
38 changes: 23 additions & 15 deletions .github/workflows/release_helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-node@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Extract version
id: extract_version
run: node -pe "'::set-output name=version::' + require('./package.json').version"
run: |
node -pe "'version=' + require('./package.json').version" >> $GITHUB_OUTPUT
node -pe "'npm_tag=' + (require('./package.json').version.includes('-') ? 'next' : 'latest')" >> $GITHUB_OUTPUT
- name: Print version
run: |
echo "releasing ${{ steps.extract_version.outputs.version }} with tag ${{ steps.extract_version.outputs.npm_tag }}"
- name: Create Release
id: create_release
uses: release-drafter/release-drafter@v5
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: v${{ steps.extract_version.outputs.version }}
tag: v${{ steps.extract_version.outputs.version }}
version: ${{ steps.extract_version.outputs.version }}
prerelease: ${{ needs.create_release.outputs.tag_name == 'next' }}
publish: true
outputs:
version: ${{ steps.extract_version.outputs.version }}
npm_tag: ${{ steps.extract_version.outputs.npm_tag }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
tag_name: ${{ steps.create_release.outputs.tag_name }}

Expand All @@ -42,14 +51,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-node@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm i -g yarn
- run: yarn config set checksumBehavior ignore
- name: Cache Node.js modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
./.yarn/cache
Expand All @@ -61,24 +70,23 @@ jobs:
- run: yarn build
- run: yarn pack
- name: Upload Release Asset
uses: AButler/upload-release-assets@v2.0
uses: AButler/upload-release-assets@v3.0
with:
files: 'package.tgz'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ needs.create_release.outputs.tag_name }}
- name: Publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
check-version: true
- name: Pack Publish
run: |
yarn config set npmAuthToken "${{ secrets.NPM_TOKEN }}"
yarn pack
yarn npm publish --tag "${{ needs.create_release.outputs.npm_tag }}"
sync_dev:
needs: correct_repository
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: dev
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ npm-debug.log*
/docs
samples/*.map
samples/*.js
*.tsbuildinfo
*.tsbuildinfo
.eslintcache
/docs
Loading

0 comments on commit 6e93892

Please sign in to comment.