Change summary
.github/workflows/build.yml | 28 +++++++++++++++++++++++++++
.github/workflows/ci.yml | 35 ----------------------------------
.github/workflows/goreleaser.yml | 19 -----------------
.github/workflows/soft-serve.yml | 18 -----------------
4 files changed, 29 insertions(+), 71 deletions(-)
Detailed changes
@@ -0,0 +1,28 @@
+name: build
+on: [push, pull_request]
+jobs:
+ test:
+ strategy:
+ matrix:
+ go-version: [~1.17, ^1]
+ os: [ubuntu-latest, macos-latest, windows-latest]
+ runs-on: ${{ matrix.os }}
+ env:
+ GO111MODULE: "on"
+ steps:
+ - name: Install Go
+ uses: actions/setup-go@v2
+ with:
+ go-version: ${{ matrix.go-version }}
+
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Download Go modules
+ run: go mod download
+
+ - name: Build
+ run: go build -v ./...
+
+ - name: Test
+ run: go test ./...
@@ -1,35 +0,0 @@
-name: CI
-
-on:
- push:
- branches: [ main ]
- pull_request:
-
-jobs:
-
- build:
- strategy:
- matrix:
- go-version: [~1.17]
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
-
- - name: Clone internal repositories
- run: |
- git clone -b release https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/charm-internal ../charm
- git clone -b master https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/bubbletea-internal ../bubbletea
- git clone -b main https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/wish ../wish
-
- - name: Set up Go
- uses: actions/setup-go@v2
- with:
- go-version: ${{ matrix.go-version }}
-
- - name: Build
- run: go build -v .
-
- - name: Test
- run: go test -v .
@@ -3,7 +3,7 @@ name: goreleaser
on:
push:
tags:
- - 'v*.*.*'
+ - "v*.*.*"
permissions:
contents: write
@@ -20,12 +20,6 @@ jobs:
with:
fetch-depth: 0
- - name: Clone internal repositories
- run: |
- git clone -b release https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/charm-internal ../charm
- git clone -b master https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/bubbletea-internal ../bubbletea
- git clone -b main https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/wish ../wish
-
- name: Set up Go
uses: actions/setup-go@v2
with:
@@ -59,14 +53,3 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- # - name: Update Docker Hub Readme
- # uses: christian-korneck/update-container-description-action@v1
- # env:
- # DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
- # DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }}
- # with:
- # destination_container_repo: charmcli/soft-serve
- # provider: dockerhub
- # short_description: "A tasty Git server 🍦"
- # readme_file: "README.md"
@@ -14,27 +14,9 @@ jobs:
with:
fetch-depth: 0
- - name: Clone internal repositories
- run: |
- git clone -b release https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/charm-internal ../charm
- git clone -b master https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/bubbletea-internal ../bubbletea
- git clone -b main https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/wish ../wish
-
- name: Push to Soft-Serve
uses: charmbracelet/soft-serve-action@v1
with:
server: "git.charm.sh"
ssh-key: "${{ secrets.CHARM_SOFT_SERVE_KEY }}"
name: "soft-serve"
-
- - name: Push vendor to Soft-Serve
- env:
- SSH_AUTH_SOCK: /tmp/ssh_agent.sock
- run: |
- git config --global user.email "actions@github.com"
- git config --global user.name "Charmbracelet[bot]"
- git checkout -b vendor
- go mod vendor
- git add vendor
- git commit -m 'vendor'
- git push -f soft-serve vendor