Skip to content

chore(deps): bump @sentry/node from 8.45.0 to 8.45.1 #685

chore(deps): bump @sentry/node from 8.45.0 to 8.45.1

chore(deps): bump @sentry/node from 8.45.0 to 8.45.1 #685

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'
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
release_tag: ${{ steps.release-please.outputs.tag_name }}
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: google-github-actions/release-please-action@v4
id: release-please
with:
token: ${{ secrets.SOMLENG_PERSONAL_ACCESS_TOKEN }}
build-packages:
name: Build Packages
runs-on: ubuntu-latest
needs:
- release
if: ${{ needs.release.outputs.release_created }}
strategy:
# Note Alpine isn't supported: https://nodejs.org/api/single-executable-applications.html#platform-support
matrix:
os: [linux]
platform: [amd64, arm64]
outputs:
package_name: ${{ steps.get-package-name.outputs.package_name }}
package_version: ${{ steps.get-package-name.outputs.package_version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Packages
run: |
docker buildx build --output type=local,dest=build --platform linux/${{ matrix.platform }} --target export-${{ matrix.os }} .
- name: Get package name
id: get-package-name
run: |
package_version=$(cat build/package_version.txt)
package_name=$(cat build/package_name.txt)
full_package_name=$(cat build/full_package_name.txt)
echo "package_version=$package_version" >> $GITHUB_OUTPUT
echo "package_name=$package_name" >> $GITHUB_OUTPUT
echo "full_package_name=$full_package_name" >> $GITHUB_OUTPUT
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.get-package-name.outputs.full_package_name }}
path: build/${{ steps.get-package-name.outputs.full_package_name }}
retention-days: 1
upload-packages:
name: Upload Packages
runs-on: ubuntu-latest
needs:
- build-packages
- release
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: build
pattern: ${{ needs.build-packages.outputs.package_name }}-*
merge-multiple: true
- name: Add assets to Github Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
declare -a oss=("linux")
declare -a platforms=("x86_64" "aarch64")
for os in "${oss[@]}"
do
for platform in "${platforms[@]}"
do
pkg="${{ needs.build-packages.outputs.package_name }}-$os-$platform-v${{ needs.build-packages.outputs.package_version }}.zip"
cp build/${{ needs.build-packages.outputs.package_name }}-$os-$platform-v${{ needs.build-packages.outputs.package_version }} ${{ needs.build-packages.outputs.package_name }}
zip $pkg ${{ needs.build-packages.outputs.package_name }}
gh release upload ${{ needs.release.outputs.release_tag }} $pkg
done
done
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
somleng/sms-gateway
ghcr.io/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=${{ needs.release.outputs.release_tag }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}