Updating js plugins
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [enyo] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
# patreon: # Replace with a single Patreon username
|
||||
# open_collective: # Replace with a single Open Collective username
|
||||
# ko_fi: # Replace with a single Ko-fi username
|
||||
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
# liberapay: # Replace with a single Liberapay username
|
||||
# issuehunt: # Replace with a single IssueHunt username
|
||||
# otechie: # Replace with a single Otechie username
|
||||
# custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Browser / OS:**
|
||||
- OS & Device: [e.g. iOS 14 on iPhone X]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Please submit feature requests in the Discussion tab! I will close issues that are feature requests.
|
||||
@@ -0,0 +1,155 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source
|
||||
# code and run tests across different versions of node.
|
||||
#
|
||||
# In case there is a new version in package.json and it's the main branch, it
|
||||
# will also tag and release this version.
|
||||
|
||||
name: Test and Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v2.1.1
|
||||
- name: Checkout Dropzone
|
||||
uses: actions/checkout@v2
|
||||
- run: yarn install
|
||||
- run: yarn test
|
||||
|
||||
# Auto tag when the package.json version has changed. A different job will see
|
||||
# this tag, publish it, and create a release for it.
|
||||
tag:
|
||||
name: Tag if package.json version increased
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
needs: [test]
|
||||
outputs:
|
||||
tagname: ${{ steps.auto_tag.outputs.tagname }}
|
||||
steps:
|
||||
- name: Checkout Dropzone
|
||||
uses: actions/checkout@v2
|
||||
- name: Auto tag
|
||||
id: auto_tag
|
||||
uses: Klemensas/action-autotag@1.2.3
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
with:
|
||||
tag_prefix: v
|
||||
tag_message: "Please check the changelog for a list of changes"
|
||||
|
||||
|
||||
build:
|
||||
name: Build dist files
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
needs: [test]
|
||||
steps:
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v2.1.1
|
||||
- name: Checkout Dropzone
|
||||
uses: actions/checkout@v2
|
||||
- run: yarn install
|
||||
- name: Read package.json version
|
||||
uses: pchynoweth/action-get-npm-version@1.0.1
|
||||
id: package_version
|
||||
- name: Inject package version into javascript file
|
||||
uses: jacobtomlinson/gha-find-replace@master
|
||||
id: version_replace
|
||||
with:
|
||||
include: "src/dropzone.js"
|
||||
find: "version = \"dev\""
|
||||
replace: "version = \"${{ steps.package_version.outputs.version }}\""
|
||||
- name: Abort if version wasn't replaced
|
||||
if: steps.version_replace.outputs.modifiedFiles != 1
|
||||
run: exit 1
|
||||
- run: yarn build
|
||||
- name: Upload dist folder in case of release
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
release:
|
||||
name: Create GitHub release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, tag]
|
||||
if: github.ref == 'refs/heads/main' && needs.tag.outputs.tagname != null
|
||||
steps:
|
||||
- name: Checkout Dropzone
|
||||
uses: actions/checkout@v2
|
||||
- name: Download dist folder
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
- name: Compress dist folder
|
||||
run: zip dist -r dist
|
||||
- name: Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: "${{ needs.tag.outputs.tagname }}"
|
||||
release_name: "Release ${{ needs.tag.outputs.tagname }}"
|
||||
body: "Please check the [changelog](https://github.com/dropzone/dropzone/blob/${{ github.sha }}/CHANGELOG.md) for a list of changes"
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./dist.zip
|
||||
asset_name: dist.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
|
||||
npm-publish:
|
||||
name: Publish new version to npm
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build,release]
|
||||
steps:
|
||||
- name: Checkout Dropzone
|
||||
uses: actions/checkout@v2
|
||||
- name: Download dist folder
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
- name: Publish
|
||||
uses: JS-DevTools/npm-publish@v1
|
||||
with:
|
||||
token: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
trigger-remote-releases:
|
||||
name: Dispatch the "new-release" event to packagist and bower repo
|
||||
runs-on: ubuntu-latest
|
||||
needs: [tag,release]
|
||||
steps:
|
||||
- name: Dispatch "new-release" event to the dropzone-packagist repo.
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.DRONE_PAT }}
|
||||
repository: dropzone/dropzone-packagist
|
||||
event-type: new-release
|
||||
client-payload: '{"releaseTag": "${{ needs.tag.outputs.tagname }}"}'
|
||||
- name: Dispatch "new-release" event to the dropzone-bower repo.
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.DRONE_PAT }}
|
||||
repository: dropzone/dropzone-bower
|
||||
event-type: new-release
|
||||
client-payload: '{"releaseTag": "${{ needs.tag.outputs.tagname }}"}'
|
||||
|
||||
Reference in New Issue
Block a user