Skip to content

Commit

Permalink
Merge pull request #36 from skedify/feature/SKED-7698
Browse files Browse the repository at this point in the history
feature/SKED-7698: Bump dependencies of web-app
  • Loading branch information
gevalo1 authored Aug 11, 2021
2 parents ac0aa25 + 5f81301 commit 20a52af
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 74 deletions.
39 changes: 38 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ jobs:

publish:
name: Publish extra information about the build
if: startsWith(github.ref, 'refs/heads/master')
needs: test

runs-on: ubuntu-latest

steps:
Expand All @@ -95,3 +95,40 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

release-candidate:
name: Publish a release candidate
if: startsWith(github.ref, 'refs/tags/v')
needs: test
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo ${GITHUB_REF/refs\/tags\//} | sed 's/^v//')

- name: Set the tag name to package.json
run: >-
node -e "
const fs = require('fs');
const packageJson = require('./package.json');
const version = '${{ steps.get_version.outputs.VERSION }}';
fs.writeFileSync('./package.json', JSON.stringify({ ...packageJson, version }));
"
- name: Setup node.js
uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1

- name: Release
run: npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
15 changes: 0 additions & 15 deletions .releaserc

This file was deleted.

15 changes: 2 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,12 @@ and [semantic-release](https://github.com/semantic-release/semantic-release) for

### Release Candidates

To make a (temporary) release candidate, you can use the following commands:
To make a (temporary) release candidate, push a new tag. The version in `package.json` will be the same as the tagname without the `v` prefix.

```bash
# Create a new rc from the latest/remote develop
npm run release-candidate
git tag v5.0.0-rc.1 && git push origin v5.0.0-rc.1
```

or

```bash
# Create a new rc from a specific branch
npm run release-candidate -- feature/SKED-XXXX
```

That command will make a new `rc` branch (locally and remotely) on which `semantic-release` is configured
to create a new release candidate (see `.releaserc`).

### Final Releases

Since `semantic-release` is currently configured to run on any `push`'es to `master`,
Expand Down
40 changes: 0 additions & 40 deletions npm_scripts/release-candidate.sh

This file was deleted.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@
"peerDependencies": {},
"scripts": {
"start": "tsdx watch",
"build": "tsdx build --format cjs,esm,umd",
"build": "tsdx build --format cjs,esm,umd --name SkedifyUriEncoding",
"test": "npm run test:client && npm run test:src --",
"test:src": "tsdx test",
"test:client": "node client/test/run.js ./client/test/*-test.js",
"tdd": "npm run test -- --watch",
"lint": "tsdx lint client",
"format": "npm run lint -- --fix",
"prepare": "husky install && tsdx build",
"prepare": "husky install && npm run build",
"check-coverage": "npm run test -- --ci --coverage",
"commit": "git-cz",
"commit:lint": "commitlint --edit \"$1\"",
"semantic-release": "semantic-release",
"release-candidate": "npm_scripts/release-candidate.sh"
"semantic-release": "semantic-release"
},
"prettier": {
"printWidth": 80,
Expand Down
7 changes: 6 additions & 1 deletion tsdx.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
const replace = require('@rollup/plugin-replace');

module.exports = {
// See https://github.com/formium/tsdx/issues/981
rollup(config, opts) {
// see https://github.com/formium/tsdx/issues/179
if (config.output.format === 'umd') {
delete config.external;
}

// See https://github.com/formium/tsdx/issues/981
config.plugins = config.plugins.map(p =>
p.name === 'replace'
? replace({
Expand Down

0 comments on commit 20a52af

Please sign in to comment.