Skip to content

Commit

Permalink
Adding release Github action
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamed Belgaied Hassine <[email protected]>
  • Loading branch information
belgaied2 committed Feb 21, 2024
1 parent b807130 commit 7496a2d
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: release

on:
push:
tags:
- "v*.*.*"

env:
TAG: ${{ github.ref_name }}
REGISTRY: ghcr.io
ORG: ${{ github.repository_owner }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setupGo
uses: actions/setup-go@v4
with:
go-version: '=1.19.4'
- name: Docker login
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker image
run: make docker-build-all TAG=${{ env.TAG }} ORG=${{ env.ORG }}
- name: Push docker image
run: make docker-push-all TAG=${{ env.TAG }} PROD_REGISTRY=${{ env.REGISTRY }} ORG=${{ env.ORG }}
release:
runs-on: ubuntu-latest
permissions:
contents: write
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setupGo
uses: actions/setup-go@v4
with:
go-version: '=1.20.11'
- name: Update manifests
run: |
make release RELEASE_TAG=${{ env.TAG }} ORG=${{ env.ORG }}
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: false
draft: true
fail_on_unmatched_files: true
generate_release_notes: true
discussion_category_name: Announcements
name: ${{ env.TAG }}
files: |
out/metadata.yaml
out/bootstrap-components.yaml
out/control-plane-components.yaml

0 comments on commit 7496a2d

Please sign in to comment.