Skip to content

chore(local)!: Removing teller.io from local development #2209

chore(local)!: Removing teller.io from local development

chore(local)!: Removing teller.io from local development #2209

Workflow file for this run

name: Bot
on:
push:
branches:
- main
jobs:
release_please:
name: Release Please
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
version: "${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}"
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
with:
changelog-types: |
[
{"type":"feat","section":"Features","hidden":false},
{"type":"feature","section":"Features","hidden":false},
{"type":"deps","section":"Dependencies","hidden":false},
{"type":"fix","section":"Bug Fixes","hidden":false},
{"type":"chore","section":"Miscellaneous","hidden":false},
{"type":"doc","section":"Documentation","hidden":false},
{"type":"docs","section":"Documentation","hidden":false},
{"type":"ci","section":"Build Automation","hidden":false}
]
release-type: simple
package-name: monetr
version-file: version.txt
bump-patch-for-minor-pre-major: true
build_ui:
name: Build UI
if: ${{ needs.release_please.outputs.release_created }}
needs:
- release_please
runs-on: ubuntu-latest
steps:
- id: go-cache-paths
name: Install pnpm and configure cache
run: |
npm install -g pnpm
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fix dumb git issue
run: |
git config --global --add safe.directory ${PWD}
- name: pnpm Cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
${{ runner.os }}-pnpm-store
- name: Build Interface
run: |
make interface RELEASE=${{ needs.release_please.outputs.version }}
- uses: actions/upload-artifact@v3
name: Upload UI As Artifact
with:
name: '${{ needs.release_please.outputs.version }}-maps'
path: '${{ github.workspace }}/server/ui/static'
retention-days: 7
# build_binary:
# if: ${{ needs.release_please.outputs.release_created }}
# needs:
# - release_please
# - build_ui
# - build_notice
# name: Build Binary
# runs-on: ubuntu-latest
# container: ghcr.io/monetr/build-containers/golang:1.19.4
# continue-on-error: true
# strategy:
# fail-fast: false
# matrix:
# os:
# - linux
# - darwin
# - windows
# architecture:
# - amd64
# - arm64
# steps:
# - uses: actions/checkout@v3
# - uses: actions/cache@v3
# with:
# path: |
# ~/.cache/go-build
# ~/go/pkg/mod
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# ${{ runner.os }}-go-
# - uses: actions/download-artifact@v3
# name: Download Compiled UI Artifacts
# with:
# name: '${{ needs.release_please.outputs.version }}-ui'
# path: '${{ github.workspace }}/pkg/ui/static/'
# - uses: actions/download-artifact@v3
# name: Download Third Party Notice Artifacts
# with:
# name: '${{ needs.release_please.outputs.version }}-notice'
# path: '${{ github.workspace }}/pkg/build/'
# - name: Build # I hate so much that I have to do this, but GitHub actions are awful at network connections.
# uses: nick-invision/retry@v2
# with:
# timeout_minutes: 10
# max_attempts: 3
# command: |
# RELEASE_VERSION=v${{ needs.release_please.outputs.version }} GOOS=${{ matrix.os }} GOARCH=${{ matrix.architecture }} make tar
# - uses: actions/upload-artifact@v3
# with:
# name: 'monetr-v${{ needs.release_please.outputs.version }}-${{ matrix.os }}-${{ matrix.architecture }}.tar.gz'
# path: '${{ github.workspace }}/build/monetr-v${{ needs.release_please.outputs.version }}-${{ matrix.os }}-${{ matrix.architecture }}.tar.gz'
# retention-days: 7
# upload-artifacts:
# needs:
# - release_please
# - build_ui
# - build_binary
# name: Upload Artifacts
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/download-artifact@v3
# name: Download linux/amd64
# with:
# name: 'monetr-v${{ needs.release_please.outputs.version }}-linux-amd64.tar.gz'
# path: '/tmp'
# - uses: actions/download-artifact@v3
# name: Download linux/arm64
# with:
# name: 'monetr-v${{ needs.release_please.outputs.version }}-linux-arm64.tar.gz'
# path: '/tmp'
# - uses: actions/download-artifact@v3
# name: Download darwin/amd64
# with:
# name: 'monetr-v${{ needs.release_please.outputs.version }}-darwin-amd64.tar.gz'
# path: '/tmp'
# - uses: actions/download-artifact@v3
# name: Download darwin/arm64
# with:
# name: 'monetr-v${{ needs.release_please.outputs.version }}-darwin-arm64.tar.gz'
# path: '/tmp'
# - uses: actions/download-artifact@v3
# name: Download windows/amd64
# with:
# name: 'monetr-v${{ needs.release_please.outputs.version }}-windows-amd64.tar.gz'
# path: '/tmp'
# - uses: actions/download-artifact@v3
# name: Download windows/arm64
# with:
# name: 'monetr-v${{ needs.release_please.outputs.version }}-windows-arm64.tar.gz'
# path: '/tmp'
# - name: Upload Artifacts
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# gh release upload v${{ needs.release_please.outputs.version }} /tmp/monetr-v${{ needs.release_please.outputs.version }}-linux-amd64.tar.gz --clobber
# gh release upload v${{ needs.release_please.outputs.version }} /tmp/monetr-v${{ needs.release_please.outputs.version }}-linux-arm64.tar.gz --clobber
# gh release upload v${{ needs.release_please.outputs.version }} /tmp/monetr-v${{ needs.release_please.outputs.version }}-darwin-amd64.tar.gz --clobber
# gh release upload v${{ needs.release_please.outputs.version }} /tmp/monetr-v${{ needs.release_please.outputs.version }}-darwin-arm64.tar.gz --clobber
# gh release upload v${{ needs.release_please.outputs.version }} /tmp/monetr-v${{ needs.release_please.outputs.version }}-windows-amd64.tar.gz --clobber
# gh release upload v${{ needs.release_please.outputs.version }} /tmp/monetr-v${{ needs.release_please.outputs.version }}-windows-arm64.tar.gz --clobber
docker:
if: ${{ needs.release_please.outputs.release_created }}
needs:
- release_please
name: Container (Docker)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: |
git config --global --add safe.directory ${PWD}
make container-push RELEASE_VERSION=${{ needs.release_please.outputs.version }}
deploy:
if: ${{ needs.release_please.outputs.release_created }}
needs:
- "release_please"
- "docker"
- "build_ui"
name: Deploy my.monetr.app
runs-on: ubuntu-latest
steps:
- uses: chrnorm/deployment-action@releases/v1
name: Create my.monetr.app Deployment
id: deployment
with:
initial_status: pending
token: "${{ github.token }}"
target_url: https://my.monetr.app
environment: my.monetr.app
ref: "v${{ needs.release_please.outputs.version }}"
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
name: Download UI As Artifact
with:
name: '${{ needs.release_please.outputs.version }}-maps'
path: '${{ github.workspace }}/server/ui/static'
- name: Create Sentry Release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: monetr
with:
environment: 'my.monetr.app'
version: 'v${{ needs.release_please.outputs.version }}'
sourcemaps: 'server/ui/static/assets/scripts'
url_prefix: 'https://my.monetr.app'
- name: Trigger Deployment
run: |
curl -X POST \
--fail \
-F token=${{ secrets.GITLAB_CI_TOKEN }} \
-F "ref=v${{ needs.release_please.outputs.version }}" \
-F "variables[ENVIRONMENT]=my.monetr.app" \
-F "variables[DEPLOY_VERSION]=v${{ needs.release_please.outputs.version }}" \
https://gitlab.com/api/v4/projects/46647440/trigger/pipeline