Skip to content

Commit

Permalink
Merge pull request #59 from TransbankDevelopers/chore/add-github-actions
Browse files Browse the repository at this point in the history
chore: replace travis by github actions
  • Loading branch information
Matiasnickolas authored May 6, 2024
2 parents cb9ae3b + 93fe731 commit 7df8fff
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 29 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: NPM Package Release

on:
pull_request:
branches:
- main
- develop
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Use checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use setup-node
uses: actions/setup-node@v4
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build
run: |
chmod +x package.sh
./package.sh
env:
TRAVIS_TAG: ${{ github.event.release.tag_name }}
- name: npm publish
if: ${{ github.event_name == 'release' }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Upload assets
if: ${{ github.event_name == 'release' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/pos.js
asset_name: pos.js
asset_content_type: text/javascript
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

0 comments on commit 7df8fff

Please sign in to comment.