-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into bugfix/nullable-odata-props
- Loading branch information
Showing
54 changed files
with
14,044 additions
and
6,438 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,48 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
tags-ignore: | ||
- '*.*' | ||
|
||
name: build | ||
workflow_dispatch: | ||
inputs: | ||
deploy: | ||
type: boolean | ||
required: true | ||
description: Deploy package | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.npm.outputs.version }} | ||
prerelease: ${{ steps.npm.outputs.prerelease }} | ||
deploy: ${{ steps.npm.outputs.deploy }} | ||
steps: | ||
- name: build npm package | ||
uses: tfso/action-helpers/npm-build@v1 | ||
id: npm | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TFSO_TOKEN }} | ||
FONT_AWESOME_TOKEN: ${{ secrets.FONT_AWESOME_TOKEN }} | ||
NODE_VERSION: 16 | ||
TRUNCATE_PRERELEASE: true | ||
|
||
tag: | ||
if: needs.build.outputs.deploy == 'true' || github.event.inputs.deploy == 'true' | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: push tag | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: push tag | ||
uses: tfso/action-helpers/tag@v1 | ||
with: | ||
node-version: 12 | ||
- run: npm ci | ||
- run: npm test | ||
- run: npm run lint | ||
- run: npm run build | ||
GITHUB_TOKEN: ${{ secrets.TFSO_REPO_TAG }} | ||
tag: ${{ needs.build.outputs.version }} |
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 |
---|---|---|
@@ -0,0 +1,116 @@ | ||
name: (Prerelease) Package | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+\.[0-9]+\.[0-9]+-*' # only preleases, eg v1.0.1-beta.1 | ||
|
||
env: | ||
FILES: | | ||
lib/ | ||
src/ | ||
package.json | ||
index.html | ||
LICENSE | ||
README.md | ||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
name: find version | ||
outputs: | ||
version: v${{ steps.semver.outputs.fullversion }} | ||
prerelease: ${{ steps.semver.outputs.prerelease }} | ||
steps: | ||
- name: extract tag version | ||
id: semver | ||
uses: booxmedialtd/ws-action-parse-semver@v1 | ||
with: | ||
input_string: ${{ github.ref }} | ||
version_extractor_regex: 'refs\/tags\/v(.*)$' | ||
|
||
build: | ||
if: needs.setup.outputs.prerelease | ||
runs-on: ubuntu-latest | ||
needs: setup | ||
outputs: | ||
version: ${{ needs.setup.outputs.version }} | ||
steps: | ||
- name: build npm package | ||
uses: tfso/action-helpers/npm-build@v1 | ||
id: npm | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TFSO_TOKEN }} | ||
FONT_AWESOME_TOKEN: ${{ secrets.FONT_AWESOME_TOKEN }} | ||
CUSTOM_TAG: ${{ needs.setup.outputs.version }} | ||
NODE_VERSION: 16 | ||
|
||
- name: upload package | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: package | ||
path: ${{ env.FILES }} | ||
retention-days: 7 | ||
|
||
# publish-npm: | ||
# runs-on: ubuntu-latest | ||
# name: publish to npm | ||
# needs: build | ||
# steps: | ||
# - name: download package | ||
# uses: actions/download-artifact@v3 | ||
# with: | ||
# name: package | ||
|
||
# - name: setup | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: 16 | ||
# registry-url: https://registry.npmjs.org/ | ||
# scope: '@tfso' | ||
|
||
# - name: extract npm tag | ||
# id: npmpublish | ||
# run: | | ||
# echo "tag=$(echo "${PRERELEASE}" | sed 's/v\?[0-9]*\.[0-9]*\.[0-9]*\-\([^.+]*\).*/\1/')" >> $GITHUB_OUTPUT | ||
# env: | ||
# PRERELEASE: ${{ needs.build.outputs.version }} | ||
|
||
# - name: publish prerelease version | ||
# run: | | ||
# npm publish --access public --tag ${{ steps.npmpublish.outputs.tag }} | ||
# env: | ||
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
publish-github: | ||
runs-on: ubuntu-latest | ||
name: publish to github | ||
needs: build | ||
permissions: | ||
packages: write | ||
steps: | ||
- name: download package | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: package | ||
|
||
- name: setup | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: 'https://npm.pkg.github.com' | ||
scope: '@tfso' | ||
|
||
- name: extract npm tag | ||
id: npmpublish | ||
run: | | ||
echo "tag=$(echo "${PRERELEASE}" | sed 's/v\?[0-9]*\.[0-9]*\.[0-9]*\-\([^.+]*\).*/\1/')" >> $GITHUB_OUTPUT | ||
env: | ||
PRERELEASE: ${{ needs.build.outputs.version }} | ||
|
||
- name: publish prerelease version | ||
run: | | ||
npm publish --access public --tag ${{ steps.npmpublish.outputs.tag }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_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,72 +1,105 @@ | ||
name: (Release) Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
push: | ||
tags: | ||
- 'v[0-9]+\.[0-9]+\.[0-9]+' # only full releases, eg v1.0.1 | ||
|
||
name: release | ||
env: | ||
FILES: | | ||
lib/ | ||
src/ | ||
package.json | ||
index.html | ||
LICENSE | ||
README.md | ||
jobs: | ||
build: | ||
name: create release | ||
setup: | ||
environment: prod | ||
runs-on: ubuntu-latest | ||
name: find version | ||
outputs: | ||
version: v${{ steps.semver.outputs.fullversion }} | ||
prerelease: ${{ steps.semver.outputs.prerelease }} | ||
steps: | ||
- name: build code | ||
uses: actions/checkout@v2 | ||
- name: build project | ||
run: | | ||
npm ci | ||
npm test | ||
npm run lint | ||
npm run build | ||
env: | ||
CI: true | ||
- name: upload artifact | ||
uses: actions/[email protected] | ||
- name: extract tag version | ||
id: semver | ||
uses: booxmedialtd/ws-action-parse-semver@v1 | ||
with: | ||
path: | | ||
lib/ | ||
src/ | ||
package.json | ||
index.html | ||
LICENSE | ||
README.md | ||
input_string: ${{ github.ref }} | ||
version_extractor_regex: 'refs\/tags\/v(.*)$' | ||
|
||
publish-npm: | ||
name: publish npm | ||
if: "!github.event.release.prerelease" | ||
needs: build | ||
build: | ||
runs-on: ubuntu-latest | ||
needs: setup | ||
steps: | ||
- name: download artifact | ||
uses: actions/[email protected] | ||
- name: setup | ||
uses: actions/setup-node@v1 | ||
- name: build npm package | ||
uses: tfso/action-helpers/npm-build@v1 | ||
id: npm | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org/ | ||
scope: "@tfso" | ||
- name: publish | ||
run: | | ||
npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TFSO_TOKEN }} | ||
FONT_AWESOME_TOKEN: ${{ secrets.FONT_AWESOME_TOKEN }} | ||
CUSTOM_TAG: ${{ needs.setup.outputs.version }} | ||
NODE_VERSION: 16 | ||
|
||
- name: upload package | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: package | ||
path: ${{ env.FILES }} | ||
retention-days: 7 | ||
|
||
# publish-npm: | ||
# name: publish to npm | ||
# needs: build | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: check npm | ||
# if: ${{ !env.NPM_TOKEN }} | ||
# run: | | ||
# exit 1 | ||
|
||
# - name: download artifact | ||
# uses: actions/download-artifact@v3 | ||
# with: | ||
# name: package | ||
|
||
# - name: setup | ||
# uses: actions/setup-node@v1 | ||
# with: | ||
# node-version: 16 | ||
# registry-url: https://registry.npmjs.org/ | ||
# scope: "@tfso" | ||
|
||
# - name: publish | ||
# run: | | ||
# npm publish --access public | ||
# env: | ||
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
publish-github: | ||
name: publish npm to github | ||
if: "!github.event.release.prerelease" # https://developer.github.com/v3/activity/events/types/#releaseevent | ||
name: publish to github | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- name: download artifact | ||
uses: actions/[email protected] | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: package | ||
|
||
- name: setup | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 12 | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: "@tfso" | ||
node-version: 16 | ||
registry-url: 'https://npm.pkg.github.com' | ||
scope: '@tfso' | ||
|
||
- name: publish | ||
run: | | ||
npm publish | ||
npm publish --access public | ||
env: | ||
CI: true | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_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
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
Oops, something went wrong.