Skip to content

Fixing release pipeline #48

Fixing release pipeline

Fixing release pipeline #48

Workflow file for this run

name: Build
on:
pull_request:
types: [synchronize, opened, reopened]
concurrency:
group: build
cancel-in-progress: true
jobs:
build-and-publish:
name: Build and Publish
runs-on: self-hosted-hoprnet-small
steps:
- name: Setup uhttp repository
id: setup
uses: hoprnet/uhttp-crypto/.github/actions/setup@main
with:
node-version: 20
google-credentials: ${{ secrets.GOOGLE_HOPRASSOCIATION_CREDENTIALS_REGISTRY }}
- name: Building
run: yarn build
- name: Linting
run: yarn lint:ci
- name: Formatting
run: yarn format:ci
- name: Testing
run: yarn test
- name: Publish next version
run: |
BUILD_DATE=$(date +%Y%m%d%H%M%S)
PR_VERSION=$(node -p "require('./package.json').version")-pr.${{ github.event.pull_request.number }}
jq --arg version "${PR_VERSION}-${BUILD_DATE}" '.version = $version' package.json > temp.json
mv temp.json package.json
yarn publish --no-git-tag-version --tag next
env:
NODE_AUTH_TOKEN: ${{ steps.setup.outputs.access_token }}