diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000000000000000000000000000000000..3901f38d57cfbe6ca4d21ccda4ec15ada612276c --- /dev/null +++ b/.github/workflows/build.yml @@ -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 ./... \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 9000bd8ccbcb641f32a79320fa20dd97d354f9b7..0000000000000000000000000000000000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -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 . diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 213b01a1dfa9299dd0426c13c05f9e72cfbc623d..effc1fdc352df9e1e8f5e9589d98941d068e3b47 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -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" diff --git a/.github/workflows/soft-serve.yml b/.github/workflows/soft-serve.yml index a6054e29a9b4559cf75e30a168c00b6903b0ed48..601e75e964201ffc815196f6adce55978a48a569 100644 --- a/.github/workflows/soft-serve.yml +++ b/.github/workflows/soft-serve.yml @@ -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