Skip to content

Commit 2bf31fd

Browse files
authored
Switch to single workflow (#60)
1 parent 1cf9f6a commit 2bf31fd

2 files changed

Lines changed: 23 additions & 49 deletions

File tree

.github/workflows/CI.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ jobs:
6666
version: latest
6767
args: check
6868

69-
tag:
70-
# Checks if this is a merge into the master and creates a new tag if yes.
69+
release:
70+
# Checks if this is a merge into the master(main) and creates a new release if yes.
7171
if: github.event_name != 'pull_request'
7272
needs: [test, lint, goreleaser-check]
7373
runs-on: ubuntu-latest
@@ -85,23 +85,32 @@ jobs:
8585
restore-keys: |
8686
${{ runner.os }}-go-
8787
88-
- name: Autotag Merge Commit
89-
env:
90-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91-
# TODO: replace this with GitHub Action after #41
88+
- name: Build binary
9289
run: |
93-
echo "This is merge commit, tagging"
94-
9590
make build
9691
chmod +x ./autotag/autotag
97-
./autotag/autotag -v
92+
93+
- name: Autotag Merge Commit
94+
# TODO: replace this with GitHub Action after #41
95+
run: |
96+
./autotag/autotag
9897
9998
echo "tags:" && git tag -l
10099
101-
git push origin --tags
100+
- name: Install rpm
101+
run: |
102+
sudo apt-get -qqy update && sudo apt-get -qqy install rpm
102103
103-
- name: Upload Autotag Build
104-
uses: actions/upload-artifact@v2
104+
- name: Docker Login
105+
uses: docker/login-action@v1
105106
with:
106-
name: autotag-build
107-
path: autotag/autotag
107+
registry: quay.io
108+
username: ${{ secrets.QUAY_USER }}
109+
password: ${{ secrets.QUAY_PASSWD }}
110+
111+
- name: Deploy Autotag Release
112+
# TODO(vtopc): switch to the `goreleaser/goreleaser-action` GHA?
113+
run: |
114+
curl -sL https://git.io/goreleaser | bash -s -- --parallelism=2
115+
env:
116+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)