Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 24 additions & 22 deletions .github/workflows/man_2_create_prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,29 @@ jobs:
prerelease: true
secrets: inherit # pragma: allowlist secret

notify_slack:
name: Notify on Slack
needs:
- create_release
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch_name }}
# TODO(sankalp): Need to fix this step, but can be skipped for now

- name: Format Slack message
run: |
VERSION="$(cat ./VERSION)"
SLACK_MSG=":rocket: Version $VERSION is now available."
echo "SLACK_MSG=$SLACK_MSG" >> $GITHUB_ENV
# notify_slack:
# name: Notify on Slack
# needs:
# - create_release
# runs-on: ubuntu-latest
# steps:
# - name: Checkout master
# uses: actions/checkout@v4
# with:
# ref: ${{ inputs.branch_name }}

- name: Notify Slack
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: "covalent-ci"
SLACK_USERNAME: "CovalentOpsBot"
SLACK_MESSAGE: ${{ env.SLACK_MSG }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# - name: Format Slack message
# run: |
# VERSION="$(cat ./VERSION)"
# SLACK_MSG=":rocket: Version $VERSION is now available."
# echo "SLACK_MSG=$SLACK_MSG" >> $GITHUB_ENV

# - name: Notify Slack
# uses: rtCamp/action-slack-notify@v2
# env:
# SLACK_CHANNEL: "covalent-ci"
# SLACK_USERNAME: "CovalentOpsBot"
# SLACK_MESSAGE: ${{ env.SLACK_MSG }}
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
94 changes: 49 additions & 45 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
stable_version:
description: "Stable version number, e.g. 0.32.3. Mandatory if a stable release is being created."
type: string
prerelease:
description: "true: Create a prerelease. false: Create a stable release."
required: true
type: boolean
default: true
test_release:
description: "Test the workflow but don't create the release. Uncheck this box to create a release."
required: true
Expand Down Expand Up @@ -72,12 +77,15 @@ jobs:

- name: Read version
run: |
if [ -z ${{ inputs.prerelease }} ] && \
[ -z ${{ github.event.inputs.stable_version }} ] ; then
if [ "${{ inputs.prerelease }}" = "false" ] && [ -z "${{ github.event.inputs.stable_version }}" ]; then
echo "You can't create a stable release without specifying the stable version number."
exit 1
fi
VERSION="$(cat ./VERSION)"
if [ "${{ inputs.prerelease }}" = "false" ] && [ -n "${{ github.event.inputs.stable_version }}" ]; then
VERSION="${{ github.event.inputs.stable_version }}"
else
VERSION="$(cat ./VERSION)"
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "RELEASE=v$VERSION" >> $GITHUB_ENV

Expand All @@ -91,16 +99,6 @@ jobs:
git remote set-url origin https://${{ secrets.COVALENT_OPS_BOT_TOKEN }}@github.com/AgnostiqHQ/covalent.git
git push origin $RELEASE

- name: Generate stable release message
if: >
github.event.inputs.stable_version
&& contains(env.PAUL_BLART, github.actor)
id: stable-changelog
uses: AgnostiqHQ/covalent/.github/actions/stable-changelog@develop
with:
changelog-path: CHANGELOG.md
version-path: VERSION

- name: Generate prerelease message
if: inputs.prerelease
id: message
Expand All @@ -115,9 +113,9 @@ jobs:
- name: Create prerelease
if: >-
inputs.prerelease
&& ${{ steps.push.outcome == 'success'
&& steps.push.outcome == 'success'
&& steps.message.outcome == 'success'
&& (!github.event.inputs.test_release || github.event.inputs.test_release == 'false') }}
&& (!github.event.inputs.test_release || github.event.inputs.test_release == 'false')
uses: ncipollo/release-action@v1
with:
body: ${{ env.MESSAGE }}
Expand All @@ -127,26 +125,26 @@ jobs:

- name: Create stable release
if: >-
github.event.inputs.stable_version
github.event.inputs.stable_version && !inputs.prerelease
&& contains(env.PAUL_BLART, github.actor)
&& steps.stable-changelog.outcome == 'success'
&& (!github.event.inputs.test_release || github.event.inputs.test_release == 'false')
uses: ncipollo/release-action@v1
with:
body: ${{ steps.stable-changelog.outputs.message }}
token: ${{ secrets.COVALENT_OPS_BOT_TOKEN }}
tag: ${{ env.RELEASE }}

- name: Alert Slack
if: failure()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: "covalent-ci"
SLACK_USERNAME: "CovalentOpsBot"
SLACK_MESSAGE: "The release.yml workflow is failing in ${{ github.ref }}!"
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: ":warning: Attention Required :warning:"
SLACK_WEBHOOK: ${{ secrets.SLACK_ALERT_WEBHOOK }}
skipIfReleaseExists: true

# TODO(sankalp): Need to fix this step, but can be skipped for now
# - name: Alert Slack
# if: failure()
# uses: rtCamp/action-slack-notify@v2
# env:
# SLACK_CHANNEL: "covalent-ci"
# SLACK_USERNAME: "CovalentOpsBot"
# SLACK_MESSAGE: "The release.yml workflow is failing in ${{ github.ref }}!"
# SLACK_COLOR: ${{ job.status }}
# SLACK_TITLE: ":warning: Attention Required :warning:"
# SLACK_WEBHOOK: ${{ secrets.SLACK_ALERT_WEBHOOK }}

pypi:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -184,7 +182,17 @@ jobs:

- name: Build Stable or Pre-Release Distribution
id: pre-or-stable-build
run: python setup.py sdist
run: |
if [ "${{ inputs.prerelease }}" = "false" ] && [ -z "${{ github.event.inputs.stable_version }}" ]; then
echo "You can't create a stable release without specifying the stable version number."
exit 1
fi
if [ "${{ inputs.prerelease }}" = "false" ] && [ -n "${{ github.event.inputs.stable_version }}" ]; then
VERSION="${{ github.event.inputs.stable_version }}"
# Change the VERSION file here to the stable version
echo "$VERSION" > VERSION
fi
python setup.py sdist

- name: Transform semver version to pep440
id: version-transform
Expand All @@ -195,11 +203,6 @@ jobs:
- name: Validate Distribution
id: validate
run: |
if [ -z ${{ inputs.prerelease }} ] && \
[ -z ${{ github.event.inputs.stable_version }} ] ; then
echo "You can't create a stable release without specifying the stable version number."
exit 1
fi
VERSION="${{ steps.version-transform.outputs.version }}"
cd dist
tar xzf covalent-${VERSION}.tar.gz
Expand All @@ -221,13 +224,14 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload dist/*

- name: Alert Slack
if: failure()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: "covalent-ci"
SLACK_USERNAME: "CovalentOpsBot"
SLACK_MESSAGE: "The release.yml workflow is failing in ${{ github.ref }}!"
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: ":warning: Attention Required :warning:"
SLACK_WEBHOOK: ${{ secrets.SLACK_ALERT_WEBHOOK }}
# TODO(sankalp): Need to fix this step, but can be skipped for now
# - name: Alert Slack
# if: failure()
# uses: rtCamp/action-slack-notify@v2
# env:
# SLACK_CHANNEL: "covalent-ci"
# SLACK_USERNAME: "CovalentOpsBot"
# SLACK_MESSAGE: "The release.yml workflow is failing in ${{ github.ref }}!"
# SLACK_COLOR: ${{ job.status }}
# SLACK_TITLE: ":warning: Attention Required :warning:"
# SLACK_WEBHOOK: ${{ secrets.SLACK_ALERT_WEBHOOK }}
8 changes: 4 additions & 4 deletions .github/workflows/test_matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,31 @@
"container": "ghcr.io/agnostiqhq/covalent-dev/debian12-py311:latest",
"backend": "dask",
"experimental": false,
"trigger": ["push", "schedule", "workflow_dispatch", "pull_request"]
"trigger": ["schedule", "workflow_dispatch"]
},
{
"name": "Debian 12 / Python 3.11 / Local",
"os": "ubuntu-latest",
"container": "ghcr.io/agnostiqhq/covalent-dev/debian12-py311:latest",
"backend": "local",
"experimental": false,
"trigger": ["schedule", "workflow_dispatch", "pull_request"]
"trigger": ["schedule", "workflow_dispatch"]
},
{
"name": "Debian 12 / Python 3.12 / Dask",
"os": "ubuntu-latest",
"container": "ghcr.io/agnostiqhq/covalent-dev/debian12-py312:latest",
"backend": "dask",
"experimental": false,
"trigger": ["push", "schedule", "workflow_dispatch", "pull_request"]
"trigger": ["schedule", "workflow_dispatch"]
},
{
"name": "Debian 12 / Python 3.12 / Local",
"os": "ubuntu-latest",
"container": "ghcr.io/agnostiqhq/covalent-dev/debian12-py312:latest",
"backend": "local",
"experimental": false,
"trigger": ["schedule", "workflow_dispatch", "pull_request"]
"trigger": ["schedule", "workflow_dispatch"]
},
{
"name": "MacOS 13 / Python 3.10 / Dask",
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

### Operations

- Updated release.yml to fix release related issues

## [0.240.0-rc.0] - 2025-05-14

### Authors
Expand Down
Loading