Skip to content

vercheck: remove --update-devbox-symlink flag (#1610) #170

vercheck: remove --update-devbox-symlink flag (#1610)

vercheck: remove --update-devbox-symlink flag (#1610) #170

Workflow file for this run

name: cli-release
# Releases the Devbox CLI
concurrency: cli-release
on:
# Build/Release on demand
workflow_dispatch:
inputs:
create_edge_release:
description: "Create edge release?"
required: false
default: false
type: boolean
schedule:
- cron: "45 8 * * 4" # Create edge weekly on Thursdays.
push:
tags:
- "*" # Tags that trigger a new release version
permissions:
contents: write
pull-requests: read
id-token: write # Needed for aws-actions/configure-aws-credentials@v1
jobs:
tests:
uses: ./.github/workflows/cli-tests.yaml
with:
# This will run the basic testscript unit tests on MacOS.
# NOTE: cli-tests will NEVER run project-tests on MacOS.
run-mac-tests: true
edge:
runs-on: ubuntu-latest
environment: release
needs: tests
if: ${{ inputs.create_edge_release || github.event.schedule }}
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Needed by goreleaser to browse history.
- name: Determine edge tag
# This tag is semver and works with semver.Compare
run: echo "EDGE_TAG=0.0.0-edge.$(date +%Y-%m-%d)" >> $GITHUB_ENV
- name: Set edge tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ env.EDGE_TAG }}
tag_prefix: ""
- name: Set up go
uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
- name: Build snapshot with goreleaser
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: latest
args: release --rm-dist --skip-publish --skip-announce --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TELEMETRY_KEY: ${{ secrets.TELEMETRY_KEY }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
with:
environment: development
version: ${{ env.EDGE_TAG }}
- name: Publish snapshot release to GitHub
uses: softprops/action-gh-release@v1
with:
prerelease: true
body: "${{ env.EDGE_TAG }} edge release"
fail_on_unmatched_files: true
tag_name: ${{ env.EDGE_TAG }}
files: |
dist/checksums.txt
dist/*.tar.gz
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: us-west-2
- name: Update edge version in s3
run: |
tmp_file=$(mktemp)
echo "${{ env.EDGE_TAG }}" > $tmp_file
aws s3 cp $tmp_file s3://releases.jetpack.io/devbox/edge/version
release:
runs-on: ubuntu-latest
environment: release
needs: tests
# Only release when there's a tag for the release.
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Needed by goreleaser to browse history.
- name: Set up go
uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
with:
environment: production
version: ${{ github.ref }}
- name: Release with goreleaser
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TELEMETRY_KEY: ${{ secrets.TELEMETRY_KEY }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}