Skip to content

Commit

Permalink
#build-minor: pkgs updated
Browse files Browse the repository at this point in the history
  • Loading branch information
reskume committed Dec 5, 2024
1 parent 21ff336 commit 9845c16
Show file tree
Hide file tree
Showing 10 changed files with 11,053 additions and 13,540 deletions.
124 changes: 63 additions & 61 deletions .github/workflows/github-create-release.yml
Original file line number Diff line number Diff line change
@@ -1,89 +1,91 @@
name: Create NPM package
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Release

jobs:
run-tests:
name: Run tests
runs-on: ubuntu-latest
# only run if specific '#build' tag is found in commit message
if: contains(github.event.head_commit.message, '#build')
name: "Run tests"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
# this is important to make sure that tokens are not reused in subsequent steps
# -> removeing this will cause the "GITHUB_TOKEN: ${{ secrets.AUTOMATOR_DEVOPS_PAT }}" to
# reuse the token from the previous step although defined otherwise
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 22
registry-url: https://npm.pkg.github.com/
scope: '@openaip'
scope: "@openaip"
- run: npm install
name: Install packages
env:
#NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.AUTOMATOR_PAT_PACKAGE_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.AUTOMATOR_DEVOPS_PAT}}
- run: npm run test
env:
#NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.AUTOMATOR_PAT_PACKAGE_TOKEN}}
- run: npm run lint
# TODO Un-comment as soon as security fix for google libraries is out
#
# - run: npm run run-security-audit

create-release:
name: Create Release
publish:
name: "Build and publish package"
needs: run-tests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
- uses: actions/checkout@v4
# this is important to make sure that tokens are not reused in subsequent steps
# -> removeing this will cause the "GITHUB_TOKEN: ${{ secrets.AUTOMATOR_DEVOPS_PAT }}" to
# reuse the token from the previous step although defined otherwise
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: 22
registry-url: https://npm.pkg.github.com/
scope: '@openaip'
- run: npm install
env:
NODE_AUTH_TOKEN: ${{secrets.AUTOMATOR_DEVOPS_PAT}}
- id: bump-version
uses: phips28/gh-action-bump-version@master
name: Bump package version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.AUTOMATOR_DEVOPS_PAT }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
major-wording: "#build-major"
minor-wording: "#build-minor"
patch-wording: "#build-patch"
# use "patch" as default bump strategy
default: patch
tag-prefix: "v"
- uses: actions/create-release@v1
name: Create release
env:
GITHUB_TOKEN: ${{ secrets.AUTOMATOR_DEVOPS_PAT }}
with:
tag_name: ${{steps.bump-version.outputs.newTag}}
release_name: Release ${{steps.bump-version.outputs.newTag}}
body: |
Changes in this Release
Various fixes and improvements.
${{ github.event.head_commit.message }}
Various fixes and performance improvements.
draft: false
prerelease: false

publish-package-github:
needs: run-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
# publish to GitHub Package Registry for internal use with @openaip namespace
- uses: actions/setup-node@v3
with:
# TODO set to v15 when https://github.com/actions/setup-node/issues/213 is fixed
node-version: 14
node-version: 22
registry-url: https://npm.pkg.github.com/
scope: '@openaip'
- run: npm ci --only=prod
env:
#NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.AUTOMATOR_PAT_PACKAGE_TOKEN}}
- run: npm publish
name: Publish to GitHub Package Registry
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

publish-package-npm:
needs: run-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
NODE_AUTH_TOKEN: ${{secrets.AUTOMATOR_DEVOPS_PAT}}
# publish to NPM for public access
- uses: actions/setup-node@v3
with:
# TODO set to v15 when https://github.com/actions/setup-node/issues/213 is fixed
node-version: 14
node-version: 22
registry-url: https://registry.npmjs.org
scope: '@openaip'
- run: npm ci --only=prod
- run: npm publish --access public
name: Publish to NPM Package Registry
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
permissions:
contents: write
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*
!schemas
!src
!license.txt
!cli.js
!index.js
!package.json
!package-lock.json
!README.md
1 change: 1 addition & 0 deletions .redeployapp copy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Thu Dec 5 19:11:10 CET 2024
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 18.12.1
nodejs 22.6.0
200 changes: 0 additions & 200 deletions jest.config.js

This file was deleted.

Loading

0 comments on commit 9845c16

Please sign in to comment.