-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from PiwikPRO/PPI-1059-add-base-package
PPI-1059 Add base package
- Loading branch information
Showing
38 changed files
with
2,799 additions
and
4,591 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,29 @@ | ||
name: Bump and Publish | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [released] | ||
# refs/tags/x.x.x | ||
workflow_dispatch: | ||
inputs: | ||
logLevel: | ||
description: 'Log level' | ||
required: true | ||
default: 'warning' | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16 | ||
- name: 'Cache node Modules' | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- run: yarn | ||
- run: npm run test | ||
bump-and-build: | ||
needs: tests | ||
publish: | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16 | ||
registry-url: https://registry.npmjs.org/ | ||
- name: 'Cache node Modules' | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- run: yarn | ||
- run: npm --no-git-tag-version --allow-same-version version ${{ steps.get_version.outputs.VERSION }} | ||
- run: npm run build | ||
- run: npm pack | ||
- name: 'Upload Build Artifatc ${{ steps.get_version.outputs.VERSION }}' | ||
uses: actions/upload-artifact@v2 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
|
||
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c | ||
with: | ||
name: ${{ steps.get_version.outputs.VERSION }}.tgz | ||
path: piwikpro-react-piwik-pro-${{ steps.get_version.outputs.VERSION }}.tgz | ||
publish-npm: | ||
needs: bump-and-build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
- name: Download a Build Artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ steps.get_version.outputs.VERSION }}.tgz | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm publish piwikpro-react-piwik-pro-${{ steps.get_version.outputs.VERSION }}.tgz | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
node-version: '20' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install modules | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Publish | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
name: Build and Tests | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
run-tests: | ||
if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
|
||
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c | ||
with: | ||
node-version: '16' | ||
node-version: '20' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install Modules | ||
run: yarn | ||
- name: Install modules | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Typecheck | ||
run: yarn typecheck | ||
|
||
- name: Running Tests | ||
run: npm run test | ||
# - name: Run tests | ||
# run: yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,5 @@ yarn-error.log* | |
|
||
# ide | ||
.idea | ||
|
||
docs_raw |
Oops, something went wrong.