Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 5a543b8

Browse files
committed
chore: publish workflow
1 parent 8e57eed commit 5a543b8

File tree

6 files changed

+51
-23
lines changed

6 files changed

+51
-23
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[*.yml]
2+
indent_size = 2
3+
indent_style = space
4+
15
[*]
26
indent_size = 4
37
indent_style = space

.github/.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
printWidth: 120
2+
tabWidth: 2
3+
singleQuote: true

.github/workflows/build.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build PR
2+
on: [push]
3+
4+
jobs:
5+
build:
6+
name: Build
7+
runs-on: ubuntu-latest
8+
env:
9+
AWS_ACCESS_KEY_ID: foo
10+
AWS_SECRET_ACCESS_KEY: bar
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: install
14+
run: yarn
15+
- name: build
16+
run: yarn run build
17+
- name: run localstack
18+
run: docker-compose up -d
19+
- name: wait for localstack
20+
run: ./scripts/wait-for-url.js http://localhost:4575 && sleep 5
21+
- name: test
22+
run: yarn test

.github/workflows/ci-build.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# https://help.github.com/en/actions/language-and-framework-guides/publishing-nodejs-packages#publishing-packages-using-yarn
2+
name: Publish to NPM
3+
on:
4+
release:
5+
types: [created]
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
# Setup .npmrc file to publish to npm
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: '12.x'
15+
registry-url: 'https://registry.npmjs.org'
16+
scope: '@octocat' # Defaults to the user or organization that owns the workflow file
17+
- run: yarn
18+
- run: yarn build
19+
- run: yarn publish
20+
env:
21+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sns-sqs-big-payload",
3-
"version": "1.0.0",
3+
"version": "0.0.1",
44
"license": "MIT",
55
"scripts": {
66
"test": "jest",

0 commit comments

Comments
 (0)