Skip to content

Merge pull request #28 from tangro/dependabot/github_actions/actions/… #41

Merge pull request #28 from tangro/dependabot/github_actions/actions/…

Merge pull request #28 from tangro/dependabot/github_actions/actions/… #41

name: release action
on:
push:
branches:
- master
jobs:
release-version:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Authenticate with GitHub package registry to be able to download from private repositories
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
- name: npm install
run: npm install
- name: release new version
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add -A
git diff-index --quiet HEAD || git commit -m "preparing release of new version"
npm version patch -m "Release new version: %s"
git push --tags
release-latest:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: go to latest branch
run: git checkout -B latest
- name: merge with master
run: git merge origin/master --no-edit
- name: Authenticate with GitHub package registry to be able to download from private repositories
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
- name: npm install
run: npm install
- name: run build
run: npm run build
- name: add and push
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add -A
git diff-index --quiet HEAD || git commit -m "released new version"
git push --force https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY latest