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

Commit

Permalink
feat: move module tags creation to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
paralta committed Feb 23, 2024
1 parent f37c46a commit db98163
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 31 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
if-no-files-found: error
compression-level: 0

main_release:
prerelease:
needs:
- verification
- build_and_push
Expand All @@ -125,10 +125,17 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Delete tag
# env:
# VERSION: ${{ github.ref_name }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: git push origin :${{ github.ref_name }}

- name: Create and push module tags
# env:
# VERSION: ${{ github.ref_name }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make multimod-push-tags

- name: Download artifacts
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
Expand All @@ -142,34 +149,27 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make generate-release-notes

main_release:
needs:
- prerelease
name: Release
runs-on: ubuntu-latest
strategy:
matrix:
tags: ["uibackend/types", "uibackend/server", "uibackend/client", "core", "provider", "utils", "installation", "cli", "testenv", "api/types", "api/server", "api/client", "e2e", "containerruntimediscovery/types", "containerruntimediscovery/server", "containerruntimediscovery/client", "orchestrator"]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: "dist/*.tar.gz,dist/*.sha256sum,dist/bicep/vmclarity.json,dist/bicep/vmclarity-UI.json"
bodyFile: "dist/CHANGELOG.md"
draft: true
name: "Release ${{ github.ref_name }}"
name: "Release ${{ matrix.tags }}"
updateOnlyUnreleased: true

# TODO(sambetts) We need to publish a tag in the format "api/<version>" tag
# so that go mod is able to import the api module without overriding. We need
# to work out how to do this cleanly from github actions on release so that
# we don't need to manage it manually. We could do something this which will
# create another release:
#
# api_release:
# needs: release
# name: Release API Module
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Release API
# uses: softprops/action-gh-release@v1
# with:
# name: VMClarity {{ github.ref }} API
# body: See main {{ github.ref }} release for release notes.
# tag_name: api/{{ github.ref }}
tag: ${{ matrix.tags }}/${{ github.ref_name }}
7 changes: 4 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,18 @@ git push origin release/v0.7.0

* Create a pull request with the changes.

## 3. Create and Push Tags
## 3. Create and Push Tag

* After the pull request is approved and merged, update your local main branch.
```sh
git checkout main
git pull origin main
```

* Create and push the tags for the last commit to the repository.
* Create and push a new tag in order to trigger the `Release` workflow.
```sh
make multimod-push-tags
git tag -a v0.7.0
git push origin v0.7.0
```

## Post-release Checks
Expand Down

0 comments on commit db98163

Please sign in to comment.