Skip to content

Commit

Permalink
ci: publish needs es started up too (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson authored Jun 6, 2022
1 parent bce7bc3 commit 63f8181
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 4 deletions.
66 changes: 63 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,68 @@ on:

env:
CI: true
node-version: 16

jobs:
publish:
uses: haraka/.github/.github/workflows/publish.yml@master
secrets: inherit
build:
runs-on: ubuntu-latest
# services:
# redis:
# image: redis
# ports:
# - 6379:6379
steps:
- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- uses: miyataka/elasticsearch-github-actions@1
with:
stack-version: '7.6.2'
- uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
- uses: actions/checkout@v3
- run: npm install
- run: npm test

publish-npm:
needs: [ build ]
runs-on: ubuntu-latest
environment: npm
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
registry-url: https://registry.npmjs.org/
- uses: actions/checkout@v3
with:
fetch-depth: 0 # needed by GitHub Release
- name: publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

publish-gpr:
needs: [ build ]
runs-on: ubuntu-latest
environment: ghpm
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
registry-url: https://npm.pkg.github.com/
scope: "@haraka"
- name: rename package with @haraka scope
run: node .release/npm/prepend-scope.cjs @haraka
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.github
.release
.gitmodules
.codeclimate.yml
7 changes: 7 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
### Unreleased


### [1.0.8] - 2022-06-06

- ci: add .npmignore
- ci: publish needs es started up too


### [1.0.7] - 2022-06-06

- ci: use shared GHA workflows
Expand Down Expand Up @@ -51,3 +57,4 @@
- initial release

[1.0.7]: https://github.com/haraka/haraka-plugin-elasticsearch/releases/tag/1.0.7
[1.0.8]: https://github.com/haraka/haraka-plugin-elasticsearch/releases/tag/1.0.8
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haraka-plugin-elasticsearch",
"version": "1.0.7",
"version": "1.0.8",
"description": "Haraka plugin that saves logs to Elasticsearch",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 63f8181

Please sign in to comment.