Skip to content

build(deps): bump @sentry/tracing from 7.76.0 to 7.77.0 #282

build(deps): bump @sentry/tracing from 7.76.0 to 7.77.0

build(deps): bump @sentry/tracing from 7.76.0 to 7.77.0 #282

Workflow file for this run

on: push
name: Build
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
CI: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".tool-versions"
cache: 'npm'
- name: Setup dependencies
run: npm ci
- name: Run Tests
run: npm run test
release:
name: Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".tool-versions"
cache: 'npm'
- name: Generate dist
id: generate_dist
run: |
npm ci
npm run build
npm run dist
package_name=$(npm pkg get name | xargs echo)
echo "package_name=$package_name" >> $GITHUB_OUTPUT
- uses: google-github-actions/release-please-action@v3
id: release-please
with:
release-type: node
package-name: ${{ steps.generate_dist.outputs.package_name }}
- name: Add assets to Github Release
if: ${{ steps.release-please.outputs.release_created }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
package_version=$(npm pkg get version | xargs echo)
package_name=${{ steps.generate_dist.outputs.package_name }}
alpine_pkg=$package_name-alpine-x86_64-v$package_version.zip
linux_pkg=$package_name-linux-x86_64-v$package_version.zip
macos_pkg=$package_name-macos-x86_64-v$package_version.zip
win_pkg=$package_name-win-x86_64-v$package_version.zip
cp build/dist/$package_name-alpine $package_name
zip $alpine_pkg $package_name
cp build/dist/$package_name-linux $package_name
zip $linux_pkg $package_name
cp build/dist/$package_name-macos $package_name
zip $macos_pkg $package_name
cp build/dist/$package_name-win.exe $package_name.exe
zip $win_pkg $package_name.exe
gh release upload ${{ steps.release-please.outputs.tag_name }} $alpine_pkg
gh release upload ${{ steps.release-please.outputs.tag_name }} $linux_pkg
gh release upload ${{ steps.release-please.outputs.tag_name }} $macos_pkg
gh release upload ${{ steps.release-please.outputs.tag_name }} $win_pkg
- name: Log in to Docker Hub
if: ${{ steps.release-please.outputs.release_created }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
if: ${{ steps.release-please.outputs.release_created }}
id: meta
uses: docker/metadata-action@v4
with:
images: somleng/sms-gateway
tags: |
# set latest tag for main branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=${{ steps.release-please.outputs.tag_name }}
- name: Build and push Docker image
if: ${{ steps.release-please.outputs.release_created }}
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}