Skip to content
Merged
Show file tree
Hide file tree
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
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
tags: ['v*']

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
body: 'Release ${{ github.ref_name }}'
draft: false
prerelease: false

- name: Upload built assets to release
run: |
# Upload all built files as release assets
for file in flotr2*.js; do
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/javascript" \
--data-binary @"$file" \
"${{ steps.create_release.outputs.upload_url }}?name=$file"
done
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test

on:
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install Playwright browsers
run: npx playwright install --with-deps

- name: Run tests
run: make test
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## v2 (2014-07-21)

v2 released.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,11 @@ flotr-amd: flotr2
cat js/amd/pre.js > flotr2.amd.js
cat build/flotr2.js >> flotr2.amd.js
cat js/amd/post.js >> flotr2.amd.js

release:
@echo "Usage: make release VERSION=v1.2.3"
@if [ -z "$(VERSION)" ]; then \
echo "Error: VERSION is required"; \
exit 1; \
fi
@./scripts/release.sh $(VERSION)
4 changes: 2 additions & 2 deletions examples/js/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@

// Resources
resources = [
'https://raw.github.com/HumbleSoftware/Flotr2/master/flotr2.min.js',
'https://raw.github.com/HumbleSoftware/Flotr2/master/examples/examples.css'
'https://raw.github.com/HumbleSoftware/Flotr2/main/flotr2.min.js',
'https://raw.github.com/HumbleSoftware/Flotr2/main/examples/examples.css'
];
input = $('<input type="hidden" name="resources">')
.attr('value', resources.join(','));
Expand Down
Loading