Skip to content

Commit

Permalink
Merge pull request #5268 from psafont/release-bumper
Browse files Browse the repository at this point in the history
Simplify the release and the main workflow releases
  • Loading branch information
robhoes authored Nov 30, 2023
2 parents 89f1bcf + e84759a commit 84fe2e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

# The checkout action performs a shallow, this triggers dune to set the
# version to <hash>-dirty. Work around this dune behaviour and tag the
# commit so a proper version is always picked up
- name: Tag current commit
run: |
git config user.name "Dune workaround"
git config user.email "<>"
git tag -am "workaround for dune" "$XAPI_VERSION"
- name: Pull configuration from xs-opam
run: |
curl --fail --silent https://raw.githubusercontent.com/xapi-project/xs-opam/master/tools/xs-opam-ci.env | cut -f2 -d " " > .env
Expand Down
22 changes: 6 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ on:
- 'v*'

jobs:
build:
build-python:
runs-on: ubuntu-latest
env:
XAPI_VERSION: ${{ github.ref_name }}

steps:
- name: Checkout code
Expand All @@ -27,7 +25,7 @@ jobs:
- name: Generate python package for XenAPI
run: |
./configure --xapi-version=${{ github.ref_name }}
./configure --xapi_version=${{ github.ref_name }}
make python
- name: Store python distribution artifacts
Expand All @@ -39,28 +37,20 @@ jobs:

release:
runs-on: ubuntu-latest
needs: build
needs: build-python
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Retrieve python distribution artifacts
uses: actions/download-artifact@v3
with:
name: XenAPI
path: dist/

- name: Draft Release ${{ github.ref_name }}
run: gh release create ${{ github.ref_name }} --draft --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload artifacts
run: gh release upload ${{ github.ref_name }} dist/*
- name: Create release ${{ github.ref_name }}
run: gh release create ${{ github.ref_name }} --repo ${{ github.repository }} --generate-notes dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish:
publish-pypi:
runs-on: ubuntu-latest
needs: release
environment: pypi
Expand Down

0 comments on commit 84fe2e5

Please sign in to comment.