Skip to content

Commit 5b05094

Browse files
Paul Boocockpaulboocock
authored andcommitted
Prepare for 3.0.0 release
1 parent 3a72043 commit 5b05094

File tree

4 files changed

+97
-33
lines changed

4 files changed

+97
-33
lines changed

.github/workflows/publish.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: Deploy Tracker
22

33
on:
4-
push:
5-
tags:
6-
- '[0-9]+.[0-9]+.[0-9]+'
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'The release tag'
8+
required: true
79

810
jobs:
911
deploy:
@@ -31,14 +33,24 @@ jobs:
3133
- name: Rush Install
3234
run: node common/scripts/install-run-rush.js install
3335

34-
- name: Setup git for Rush
36+
- name: Setup git
3537
uses: oleksiyrudenko/gha-git-credentials@v2-latest
3638
with:
3739
token: '${{ secrets.GITHUB_TOKEN }}'
3840

3941
- name: Rush Version
4042
run: node common/scripts/install-run-rush.js version --bump --target-branch master
4143

44+
- name: Get version
45+
id: version
46+
run: echo "##[set-output name=TRACKER_VERSION;]$(node -p "require('./trackers/javascript-tracker/package.json').version")"
47+
48+
- name: Fail if version mismatch
49+
if: ${{ github.event.inputs.version != steps.version.outputs.TRACKER_VERSION }}
50+
run: |
51+
echo "Input version (${{ github.event.inputs.version }}) doesn't match version in project (${{ steps.version.outputs.TRACKER_VERSION }})"
52+
exit 1
53+
4254
- name: Rush Build
4355
run: node common/scripts/install-run-rush.js rebuild --verbose
4456

@@ -48,17 +60,24 @@ jobs:
4860
- name: Rush Publish
4961
run: node common/scripts/install-run-rush.js publish --apply --include-all --publish --target-branch master --set-access-level public
5062

51-
- name: Get Version Information
52-
id: get_version
53-
uses: battila7/get-version-action@v2
63+
- name: Push tag
64+
id: tag_version
65+
uses: mathieudutour/[email protected]
66+
with:
67+
github_token: ${{ secrets.GITHUB_TOKEN }}
68+
tag_prefix: ''
69+
default_bump: false
70+
custom_tag: ${{ github.event.inputs.version }}
5471

55-
- name: Zip release
72+
- name: Zip plugins
5673
run: zip -r plugins.umd.zip ./plugins/*/dist/*.umd*.js*
5774

5875
- name: Release
5976
uses: softprops/action-gh-release@v1
6077
with:
61-
name: v${{ steps.get_version.outputs.version }}
78+
name: Version ${{ steps.tag_version.outputs.new_tag }}
79+
tag_name: ${{ steps.tag_version.outputs.new_tag }}
80+
body: ${{ steps.tag_version.outputs.changelog }}
6281
files: |
6382
./trackers/javascript-tracker/dist/sp.js
6483
./trackers/javascript-tracker/dist/sp.js.map

.github/workflows/publish_prerelease.yml

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: Deploy Tracker Prerelease
22

33
on:
4-
push:
5-
tags:
6-
- '[0-9]+.[0-9]+.[0-9]+-*'
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'The release tag'
8+
required: true
79

810
jobs:
911
deploy:
@@ -31,34 +33,51 @@ jobs:
3133
- name: Rush Install
3234
run: node common/scripts/install-run-rush.js install
3335

34-
- name: Setup git for Rush
36+
- name: Setup git
3537
uses: oleksiyrudenko/gha-git-credentials@v2-latest
3638
with:
3739
token: '${{ secrets.GITHUB_TOKEN }}'
3840

39-
- name: Update Version
41+
- name: Rush Version
4042
run: node common/scripts/install-run-rush.js version --bump
4143

44+
- name: Get version
45+
id: version
46+
run: echo "##[set-output name=TRACKER_VERSION;]$(node -p "require('./trackers/javascript-tracker/package.json').version")"
47+
48+
- name: Fail if version mismatch
49+
if: ${{ github.event.inputs.version != steps.version.outputs.TRACKER_VERSION }}
50+
run: |
51+
echo "Input version (${{ github.event.inputs.version }}) doesn't match version in project (${{ steps.version.outputs.TRACKER_VERSION }})"
52+
exit 1
53+
4254
- name: Rush Build
4355
run: node common/scripts/install-run-rush.js rebuild --verbose
4456

4557
- name: Rush Test
4658
run: node common/scripts/install-run-rush.js test --verbose
4759

4860
- name: Rush Publish
49-
run: node common/scripts/install-run-rush.js publish --apply --include-all --publish --tag next --set-access-level public
61+
run: node common/scripts/install-run-rush.js publish --apply --include-all --publish --tag next --set-access-level public
5062

51-
- name: Get Version Information
52-
id: get_version
53-
uses: battila7/get-version-action@v2
63+
- name: Push tag
64+
id: tag_version
65+
uses: mathieudutour/[email protected]
66+
with:
67+
github_token: ${{ secrets.GITHUB_TOKEN }}
68+
tag_prefix: ''
69+
default_bump: false
70+
custom_tag: ${{ github.event.inputs.version }}
5471

55-
- name: Zip release
72+
- name: Zip plugins
5673
run: zip -r plugins.umd.zip ./plugins/*/dist/*.umd*.js*
5774

5875
- name: Release
5976
uses: softprops/action-gh-release@v1
6077
with:
61-
name: v${{ steps.get_version.outputs.version }}
78+
name: Version ${{ steps.tag_version.outputs.new_tag }}
79+
tag_name: ${{ steps.tag_version.outputs.new_tag }}
80+
body: ${{ steps.tag_version.outputs.changelog }}
6281
prerelease: true
6382
files: |
6483
./trackers/javascript-tracker/dist/sp.js

README.md

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Web analytics for Snowplow
1+
# Browser and Node.js analytics for Snowplow
22

33
[![actively-maintained]][tracker-classificiation]
4-
[![Build Status][gh-actions-image]][gh-actions]
5-
[![Saucelabs Test Status][saucelabs-button-image]][saucelabs]
64
[![Release][release-image]][releases]
75
[![License][license-image]](LICENSE)
6+
[![Build Status][gh-actions-image]][gh-actions]
7+
[![Saucelabs Test Status][saucelabs-button-image]][saucelabs]
88

99
## Overview
1010

@@ -13,18 +13,39 @@ Add analytics to your websites, web apps and Node.js applications with the [Snow
1313
With these trackers you can collect user event data (page views, e-commerce transactions etc) from the
1414
client-side and server-side tiers of your websites and web apps.
1515

16-
## Find out more
16+
**Technical documentation can be found for each tracker in our [Documentation](docs).**
17+
18+
### @snowplow/browser-tracker (npm)
1719

18-
| Technical Docs | Setup Guide | Contributing |
19-
|-------------------------------------|------------------------------|--------------------------------------|
20-
| [![i1][techdocs-image]][tech-docs] | [![i2][setup-image]][setup] | ![i3][contributing-image] |
21-
| [Technical Docs][tech-docs] | [Setup Guide][setup] | [Contributing](Contributing.md) |
20+
| Technical Docs | Setup Guide |
21+
|---------------------------------------------|--------------------------------------|
22+
| [![i1][techdocs-image]][tech-docs-browser] | [![i2][setup-image]][setup-browser] |
23+
| [Technical Docs][tech-docs-browser] | [Setup Guide][setup-browser] |
24+
25+
### @snowplow/javascript-tracker (tag based)
26+
27+
| Technical Docs | Setup Guide |
28+
|----------------------------------------|---------------------------------|
29+
| [![i3][techdocs-image]][tech-docs-js] | [![i4][setup-image]][setup-js] |
30+
| [Technical Docs][tech-docs-js] | [Setup Guide][setup-js] |
31+
32+
### @snowplow/node-tracker (npm)
33+
34+
| Technical Docs | Setup Guide |
35+
|------------------------------------------|-----------------------------------|
36+
| [![i5][techdocs-image]][tech-docs-node] | [![i6][setup-image]][setup-node] |
37+
| [Technical Docs][tech-docs-node] | [Setup Guide][setup-node] |
2238

2339
## Maintainers
2440

41+
| Contributing |
42+
|--------------------------------------|
43+
| ![i7][contributing-image] |
44+
| [Contributing](Contributing.md) |
45+
2546
### Contributing quick start
2647

27-
Assuming [git](https://git-scm.com/downloads), [Node.js 10+ LTS](https://nodejs.org/en/download/releases/).
48+
Assuming [git](https://git-scm.com/downloads), [Node.js 10, 12 or 14 LTS](https://nodejs.org/en/download/releases/) are installed.
2849

2950
#### Clone repository
3051

@@ -67,8 +88,13 @@ All rights reserved.
6788

6889
[snowplow]: http://snowplowanalytics.com/
6990
[docker-install]: https://docs.docker.com/install/
70-
[setup]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/general-parameters/
71-
[tech-docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/
91+
[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/
92+
[tech-docs-browser]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/browser-tracker-v3-reference/
93+
[setup-browser]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/quick-start-guide/
94+
[tech-docs-js]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3/
95+
[setup-js]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/web-quick-start-guide/
96+
[tech-docs-node]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/node-js-tracker/node-js-tracker-v3/
97+
[setup-node]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/node-js-tracker/node-js-tracker-v3/setup/
7298
[techdocs-image]: https://d3i6fms1cm1j0i.cloudfront.net/github/images/techdocs.png
7399
[setup-image]: https://d3i6fms1cm1j0i.cloudfront.net/github/images/setup.png
74100
[contributing-image]: https://d3i6fms1cm1j0i.cloudfront.net/github/images/contributing.png
@@ -80,6 +106,6 @@ All rights reserved.
80106
[saucelabs-button-image]: https://img.shields.io/static/v1?style=flat&label=Sauce%20Labs&message=Tested&color=e2231a&logo=sauce-labs
81107
[saucelabs-matrix-image]: https://app.saucelabs.com/browser-matrix/snowplow.svg
82108
[osi]: https://opensource.org/licenses/BSD-3-Clause
83-
[license-image]: https://img.shields.io/github/license/snowplow/snowplow-javascript-tracker
109+
[license-image]: https://img.shields.io/npm/l/@snowplow/javascript-tracker
84110
[tracker-classificiation]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/tracker-maintenance-classification/
85111
[actively-maintained]: https://img.shields.io/static/v1?style=flat&label=Snowplow&message=Actively%20Maintained&color=6638b8&labelColor=9ba0aa&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAeFBMVEVMaXGXANeYANeXANZbAJmXANeUANSQAM+XANeMAMpaAJhZAJeZANiXANaXANaOAM2WANVnAKWXANZ9ALtmAKVaAJmXANZaAJlXAJZdAJxaAJlZAJdbAJlbAJmQAM+UANKZANhhAJ+EAL+BAL9oAKZnAKVjAKF1ALNBd8J1AAAAKHRSTlMAa1hWXyteBTQJIEwRgUh2JjJon21wcBgNfmc+JlOBQjwezWF2l5dXzkW3/wAAAHpJREFUeNokhQOCA1EAxTL85hi7dXv/E5YPCYBq5DeN4pcqV1XbtW/xTVMIMAZE0cBHEaZhBmIQwCFofeprPUHqjmD/+7peztd62dWQRkvrQayXkn01f/gWp2CrxfjY7rcZ5V7DEMDQgmEozFpZqLUYDsNwOqbnMLwPAJEwCopZxKttAAAAAElFTkSuQmCC

trackers/javascript-tracker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ All rights reserved.
8989
[npm-image]: https://img.shields.io/npm/v/@snowplow/browser-tracker
9090
[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/
9191
[osi]: https://opensource.org/licenses/BSD-3-Clause
92-
[license-image]: https://img.shields.io/npm/l/@snowplow/browser-tracker
92+
[license-image]: https://img.shields.io/npm/l/@snowplow/javascript-tracker

0 commit comments

Comments
 (0)