Skip to content

Commit

Permalink
release: add semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Dec 6, 2022
1 parent 772fb45 commit f45486e
Show file tree
Hide file tree
Showing 5 changed files with 7,451 additions and 2,381 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: release
on:
workflow_dispatch:
repository_dispatch:
types: [release]

jobs:
release:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: npx semantic-release
if: success()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
8 changes: 0 additions & 8 deletions .npmignore

This file was deleted.

4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function gateway(configPath) {
service.path,
service.auth || (service.auth === undefined && config.auth) ? auth : null,
service.rewrite ? rewrite(service.path, service.rewrite) : null,
proxy(service.url),
proxy(service.url)
];
app.all(...routeConfig.filter(Boolean));
}
Expand All @@ -55,7 +55,7 @@ export default function gateway(configPath) {
const cert = fs.readFileSync(config.https.cert, 'utf8');
const ca = config.https.ca ? fs.readFileSync(config.https.ca, 'utf8') : undefined;
server.http = https
.createServer({key, cert, ca}, app)
.createServer({ key, cert, ca }, app)
.listen(config.https.port || 8443, showAddress.bind(this, 'https'));
}
}
Loading

0 comments on commit f45486e

Please sign in to comment.