Skip to content

Commit

Permalink
removed travis submodule
Browse files Browse the repository at this point in the history
working on github action release
  • Loading branch information
“Fernando committed Jan 13, 2022
1 parent 737c33c commit 3fe2a7c
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 73 deletions.
40 changes: 27 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
name: Release
on:
workflow_dispatch:
inputs:
name:
description: 'Person to greet'
required: true
default: 'Mona the Octocat'
home:
description: 'location'
required: false
default: 'The Octoverse'
jobs:
release:
name: NPM Publish
runs-on: ubuntu-latest
steps:
- run: echo "Hello ${{ github.event.inputs.name }} - in ${{ github.event.inputs.home }}!"
Expand All @@ -23,13 +15,35 @@ jobs:
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm pack
- run: echo "Release ${{ github.ref }}"
- id: version
run: echo "version=$(npm run version --silent)" >> $GITHUB_ENV
- run: echo "Deploying version ${{ env.version }}"
# - run: npm publish --tag alpha
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --dry-run
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
postRelease:
name: Version Upgrade and tag
needs: release
runs-on: ubuntu-latest
steps:
- run: echo "Hello ${{ github.event.inputs.name }} - in ${{ github.event.inputs.home }}!"
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12.x
registry-url: https://registry.npmjs.org
- run: npm ci
- id: version
run: echo "version=$(npm run version --silent)" >> $GITHUB_ENV
- run: git tag -fa "v${{ env.version }}" -m "Releasing version ${{ env.version }}"
- run: npm version patch -m "Increasing version to %s" --git-tag-version false
- id: newVersion
run: echo "newVersion=$(npm run version --silent)" >> $GITHUB_ENV
- run: git add .
- run: git commit -m "Creating new version ${{ env.newVersion }}"
# - run: git push --set-upstream origin main:main
# - run: git push --tags origin
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "travis"]
path = travis
url = https://github.com/nemgrouplimited/travis-functions.git
53 changes: 0 additions & 53 deletions .travis-back.yml

This file was deleted.

7 changes: 4 additions & 3 deletions alpha.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash
set -e
. ./travis/node-functions.sh
VERSION="$(node_load_version)"
VERSION="$(npm run version --silent)"
TAG=${1:-alpha}
echo "publishing $VERSION with tag $TAG"
npm pack
/bin/bash travis/node-functions.sh node_publish_alpha $TAG
NEW_VERSION="$VERSION-$TAG-$(date +%Y%m%d%H%M)"
npm version "$NEW_VERSION" --commit-hooks false --git-tag-version false
npm publish --tag alpha
npm version "$VERSION" --commit-hooks false --git-tag-version false
npm run style:fix
1 change: 0 additions & 1 deletion travis
Submodule travis deleted from 0bb6db

0 comments on commit 3fe2a7c

Please sign in to comment.