fix: test release (#10) #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Skyetel | |
on: | |
push: | |
branches: "**" | |
tags: "v*" | |
defaults: | |
run: | |
working-directory: skyetel | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
env: | |
BUNDLE_FROZEN: false | |
with: | |
working-directory: skyetel | |
bundler-cache: true | |
- name: Run the tests | |
run: bundle exec rake | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: googleapis/release-please-action@v4 | |
id: release-please | |
with: | |
token: ${{ secrets.SOMLENG_PERSONAL_ACCESS_TOKEN }} | |
build-packages: | |
name: Build Packages | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
if: ${{ github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/v') }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- 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: | | |
ghcr.io/somleng/somleng-skyetel | |
tags: | | |
type=ref,event=tag | |
type=raw,value=beta,enable=${{ !startsWith(github.ref, 'refs/tags/v') }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
context: skyetel | |
platforms: linux/amd64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
create-sentry-release: | |
name: Create Sentry Release | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: somleng | |
SENTRY_PROJECT: somleng-skyetel | |
with: | |
environment: production | |
version: ${{ github.ref_name }} |