Skip to content

Commit

Permalink
added release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nikordaris committed Feb 4, 2022
1 parent f5a74c9 commit e4da921
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ dist
.gitignore
.eslintignore
.eslintrc.json
.npmignore
.npmrc

# DO lint the github actions, as they're just YAML.
!.github
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
push:
tags: ["v*"]

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.BUILD_PAT }}
- uses: actions/setup-node@v2
with:
node-version: "16"
cache: "npm"
- name: Install Dependencies
run: npm ci --ignore-scripts
- name: Build
run: npm run build
- name: Publish
run: npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**/*.test.ts
src/*
coverage/
junit.xml
.github/*
.husky/*
jest.config.js
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ dist
.gitignore
.eslintignore
.eslintrc.json
.npmignore
.npmrc

# Autogenerated twirp SDK files that should not be modified.
**/twirp-sdk/src
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "opentelemetry-exporter-trace-otlp-file",
"version": "0.1.0",
"description": "",
"main": "index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"prepare": "husky install",
"lint:fix": "eslint --cache --fix .",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"rootDir": "src",
"baseUrl": "src",
"outDir": "dist",
"resolveJsonModule": true
"resolveJsonModule": true,
"declaration": true
},
"exclude": ["jest.config.ts", "jest.setup.ts", "config.ts"]
}

0 comments on commit e4da921

Please sign in to comment.