Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add test run for release workflow #2398

Merged
merged 2 commits into from
May 25, 2022
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ jobs:
cd utils
# Git works without any special permissions.
# Using current branch or the branch against the PR is open.
# Using last tag as start (works for release branches) or last 30 commits
# (for main and PRs). End is the current (latest) commit.
# Using the last 30 commits (for branches, tags, and PRs).
# End is the current (latest) commit.
python ./generate_release_notes.py log \
${{ github.ref_name }} \
$(git describe --abbrev=0 --tags || git rev-parse HEAD~30) \
$(git rev-parse HEAD~30) \
""
27 changes: 20 additions & 7 deletions .github/workflows/create_release_draft.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
name: Create a release draft
name: Create or check a release draft

on:
push:
branches:
- main
- releasebranch_*
tags:
- '**'
pull_request:
branches:
- main
- releasebranch_*
paths:
- '.github/**'
- 'utils/**'

jobs:
build:
Expand All @@ -24,8 +34,9 @@ jobs:
git add core_modules_with_last_commit.json
git diff --cached > core_modules_with_last_commit.patch

- name: Create new release draft
- name: Create new release draft (for tags only)
id: create_release
if: startsWith(github.ref, 'refs/tags/')
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -37,9 +48,10 @@ jobs:
- First change
- Second change
draft: true
prerelease: ${{ contains(github.ref, "RC") }}
prerelease: ${{ contains(github.ref, 'RC') }}

- name: Upload core_modules_with_last_commit.json file
- name: Upload core_modules_with_last_commit.json file (for tags only)
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
Expand All @@ -49,7 +61,8 @@ jobs:
asset_name: core_modules_with_last_commit.json
asset_content_type: application/json

- name: Upload core_modules_with_last_commit.patch file
- name: Upload core_modules_with_last_commit.patch file (for tags only)
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
Expand All @@ -59,9 +72,9 @@ jobs:
asset_name: core_modules_with_last_commit.patch
asset_content_type: text/plain

- name: On failure, make the created files available
- name: Make the created files available
uses: actions/upload-artifact@v3
if: failure()
if: always()
with:
name: artifacts
path: |
Expand Down