Skip to content

Commit

Permalink
Merge pull request #22 from kyma-project/fix/release5
Browse files Browse the repository at this point in the history
fix release workflow 5
  • Loading branch information
szeort authored Jul 12, 2024
2 parents 514f5ce + f8f1ddf commit 394e409
Showing 1 changed file with 73 additions and 72 deletions.
145 changes: 73 additions & 72 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,73 @@
name: Release Workflow

on:
push:
tags:
- 'v*'
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
release:
name: Release
runs-on: [ self-hosted ]

permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: set version
run: echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
id: version

- name: docker build
run: VERSION=${{ steps.version.outputs.version }} make docker-build

- name: docker-push
run: VERSION=${{ steps.version.outputs.version }} make docker-push

- name: prepare release artifacts
run: VERSION=${{ steps.version.outputs.version }} make release

- name: Create draft release
env:
VERSION: ${{ steps.version.outputs.version }}
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
gh release create "${VERSION}" --draft --notes-file RELEASE.md
- name: Publish Release
env:
VERSION: ${{ steps.version.outputs.version }}
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
gh release edit "${VERSION}" --draft=false --latest
- name: Upload release artifacts
env:
VERSION: ${{ steps.version.outputs.version }}
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
gh release upload "${VERSION}" "./release-${VERSION}/cfapi-default-cr.yaml"
gh release upload "${VERSION}" "./release-${VERSION}/cfapi-crd.yaml"
gh release upload "${VERSION}" "./release-${VERSION}/cfapi-manager.yaml"
name: Release Workflow

on:
push:
tags:
- 'v*'
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: [ self-hosted ]

permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: set version
run: echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
id: version

- name: docker build
run: VERSION=${{ steps.version.outputs.version }} make docker-build

- name: docker-push
run: VERSION=${{ steps.version.outputs.version }} make docker-push

- name: prepare release artifacts
run: VERSION=${{ steps.version.outputs.version }} make release

- name: Create draft release
env:
VERSION: ${{ steps.version.outputs.version }}
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
gh release create "${VERSION}" --draft --notes-file RELEASE.md
- name: Publish Release
env:
VERSION: ${{ steps.version.outputs.version }}
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
gh release edit "${VERSION}" --draft=false --latest
- name: Upload release artifacts
env:
VERSION: ${{ steps.version.outputs.version }}
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
gh release upload "${VERSION}" "./release-${VERSION}/cfapi-default-cr.yaml"
gh release upload "${VERSION}" "./release-${VERSION}/cfapi-crd.yaml"
gh release upload "${VERSION}" "./release-${VERSION}/cfapi-manager.yaml"

0 comments on commit 394e409

Please sign in to comment.