Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
ci: comment out release for now
Browse files Browse the repository at this point in the history
  • Loading branch information
tommytroen committed Mar 25, 2022
1 parent 1afe172 commit f4b320a
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,47 +57,47 @@ jobs:
- name: Ensure no files were modified as a result of the build
run: git update-index --refresh && git diff-index --quiet HEAD -- || git diff --exit-code

release:
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- set-version
- test
runs-on: ubuntu-20.04
steps:

- name: Checkout latest code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Extract version of Go to use
run: echo "GOVERSION=$(cat go.mod | grep -w "go" | awk ' { print $2 } ' | grep -w "^[^v]")" >> $GITHUB_ENV

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GOVERSION }}

- name: Create tag
run: |
git tag ${{ needs.set-version.outputs.version }}
- uses: navikt/github-app-token-generator@v1
id: get-homebrew-token
with:
private-key: ${{ secrets.NAIS_APP_PRIVATE_KEY }}
app-id: ${{ secrets.NAIS_APP_ID }}
repo: nais/homebrew-tap

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release -f .goreleaser.yml --rm-dist --debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUSH_TOKEN: ${{ steps.get-homebrew-token.outputs.token }}
# release:
# if: ${{ github.ref == 'refs/heads/main' }}
# needs:
# - set-version
# - test
# runs-on: ubuntu-20.04
# steps:
#
# - name: Checkout latest code
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
#
# - name: Extract version of Go to use
# run: echo "GOVERSION=$(cat go.mod | grep -w "go" | awk ' { print $2 } ' | grep -w "^[^v]")" >> $GITHUB_ENV
#
# - name: Set up Go
# uses: actions/setup-go@v2
# with:
# go-version: ${{ env.GOVERSION }}
#
# - name: Create tag
# run: |
# git tag ${{ needs.set-version.outputs.version }}
#
# - uses: navikt/github-app-token-generator@v1
# id: get-homebrew-token
# with:
# private-key: ${{ secrets.NAIS_APP_PRIVATE_KEY }}
# app-id: ${{ secrets.NAIS_APP_ID }}
# repo: nais/homebrew-tap
#
# - name: Run GoReleaser
# uses: goreleaser/goreleaser-action@v2
# with:
# distribution: goreleaser
# version: latest
# args: release -f .goreleaser.yml --rm-dist --debug
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PUSH_TOKEN: ${{ steps.get-homebrew-token.outputs.token }}

#- uses: navikt/github-app-token-generator@v1
# id: get-token
Expand Down Expand Up @@ -131,4 +131,4 @@ jobs:
# git add salsa_${VERSION}.deb
# git --no-pager diff --cached
# git commit --all --message "Add version ${VERSION} of salsa"
# git push
# git push

0 comments on commit f4b320a

Please sign in to comment.