Skip to content

v1.21.0

v1.21.0 #112

Workflow file for this run

name: Publish
on:
release:
types: [created]
jobs:
publish-docker:
runs-on: ubuntu-latest
steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
expediagroup/comparadise
tags: |
type=ref,event=tag
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
publish-comparadise-utils:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: package.json
- name: Install Dependencies
run: bun install
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: latest
- name: Set Version Environment Variable
run: |
VERSION_TAG=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
echo NEW_VERSION="${VERSION_TAG:1}" >> $GITHUB_ENV
- name: Publish
working-directory: comparadise-utils
run: |
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} > .npmrc
pnpm version $NEW_VERSION --workspaces-update false
pnpm publish --no-git-checks
publish-tags:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update Major Version
run: |
MAJOR_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3 | cut -d "." -f1)
echo "New version: ${MAJOR_VERSION}"
git tag ${MAJOR_VERSION}
git push --tags -f