Skip to content

Fix submodule naming #20

Fix submodule naming

Fix submodule naming #20

Workflow file for this run

name: Build 'n Deploy
permissions:
packages: write
on:
push:
branches:
- '*'
tags-ignore:
- '*'
paths-ignore:
- 'package.json'
- 'package-lock.json'
- 'bumpver.toml'
jobs:
build:
name: build, lint, and test
runs-on: ubuntu-latest
steps:
# -- Setup --
- uses: getsentry/action-github-app-token@v2
name: my-app-install token
id: podaac-cicd
with:
app_id: ${{ secrets.CICD_APP_ID }}
private_key: ${{ secrets.CICD_APP_PRIVATE_KEY }}
- uses: actions/checkout@v3
with:
repository: ${{ github.repository }}
token: ${{ steps.podaac-cicd.outputs.token }}
submodules: true
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install bumpver
run: pip3 install bumpver
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
- name: Setup git user
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
- name: Install package
run: npm ci
# -- Linting --
- name: Lint
run: npm run lint
# -- Version Bumping --
- name: Bump alpha version
if: github.ref == 'refs/heads/develop'
run: |
TAG=$(bumpver show -e | awk -F= '$1 == "TAG" {print $2};')
if [ $TAG == 'final' ]; then
# Bump patch version first then append tag
bumpver update --patch --tag alpha --tag-num
else
bumpver update --tag alpha --tag-num
fi
- name: Bump rc version
if: startsWith(github.ref, 'refs/heads/release/')
run: bumpver update --patch --tag rc --tag-num
- name: Release version
if: github.ref == 'refs/heads/main'
run: bumpver update --patch --tag final
# -- Publish --
- name: Publish
if: |
startsWith(github.ref, 'refs/heads/release/') ||
github.ref == 'refs/heads/main'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}