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

Fix new release GH workflow #1860

Merged
merged 37 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5d35523
print output
a-zakir Jan 2, 2024
d9ab701
test gh cli
a-zakir Jan 2, 2024
42a2ff1
test gh upload
a-zakir Jan 2, 2024
72dc932
test
a-zakir Jan 2, 2024
2c3c536
release windows without tests
a-zakir Jan 2, 2024
08917c8
try another shell
a-zakir Jan 2, 2024
12c4059
new centos release
a-zakir Jan 8, 2024
18cd4f9
remove unnecessary option
a-zakir Jan 8, 2024
b17b9e2
all in one job
a-zakir Jan 8, 2024
5ebcd2d
hope
a-zakir Jan 8, 2024
985660b
Merge branch 'develop' into fix/new_release
flomnes Jan 8, 2024
bd7a0c8
install gh
a-zakir Jan 9, 2024
e3d8469
install gh
a-zakir Jan 9, 2024
93c18ba
hew & elastic
a-zakir Jan 10, 2024
4d990aa
cut-off plastic
a-zakir Jan 10, 2024
2562846
yes sir
a-zakir Jan 10, 2024
e812431
disable auto description
a-zakir Jan 10, 2024
534ca67
garbage collector
a-zakir Jan 10, 2024
b6f223d
update
a-zakir Jan 10, 2024
608b73b
::
a-zakir Jan 10, 2024
f0bb324
test
a-zakir Jan 10, 2024
98b41fe
fff
a-zakir Jan 10, 2024
f7d7a85
check env var
a-zakir Jan 10, 2024
42a15b7
...
a-zakir Jan 10, 2024
772bbb9
*
a-zakir Jan 10, 2024
d7bdcf5
"
a-zakir Jan 10, 2024
c1e8225
include UG
a-zakir Jan 10, 2024
3414708
missing file
a-zakir Jan 10, 2024
3bcc2f8
win
a-zakir Jan 10, 2024
d0bc27f
Revert "win"
a-zakir Jan 10, 2024
a711fa6
fix
a-zakir Jan 10, 2024
289de31
Update .github/workflows/build-userguide.yml
a-zakir Jan 11, 2024
c11f5f6
rename job
a-zakir Jan 11, 2024
f6ce5f3
Merge branch 'fix/new_release' of https://github.com/AntaresSimulator…
a-zakir Jan 11, 2024
9a06fe9
pr suggestion
a-zakir Jan 11, 2024
8a6ce6d
fix
a-zakir Jan 11, 2024
bbee780
fix
a-zakir Jan 11, 2024
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
26 changes: 15 additions & 11 deletions .github/workflows/build-userguide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,29 @@ on:
branches:
- release/*
- doc/*
workflow_call:
inputs:
run-tests:
required: true
type: boolean

env:
IS_RELEASE: ${{ github.event_name == 'release' && github.event.action == 'created' }}
IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' }}

jobs:

build:

runs-on: ${{ matrix.os }}
runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
os: [ubuntu-20.04]

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.12

- name: Install dependencies
run: |
Expand Down Expand Up @@ -55,10 +57,12 @@ jobs:
name: pdf-reference-guide
path: ${{ env.PDF_PATH }}

- name: Upload user guide as release asset

- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: ${{ env.PDF_PATH_ASSET }}
GITHUB_TOKEN: ${{ github.token }}
tag: ${{ github.event.inputs.release_tag }}
run: |
gh release upload "$tag" ${{ env.PDF_PATH }}

32 changes: 18 additions & 14 deletions .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ on:
- develop
schedule:
- cron: '21 2 * * *'
workflow_call:
inputs:
run-tests:
required: true
type: boolean

env:
GITHUB_TOKEN: ${{ github.token }}
IS_RELEASE: ${{ github.event_name == 'release' && github.event.action == 'created' }}
IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' }}
IS_PUSH: ${{ github.event_name == 'push' }}

jobs:
Expand Down Expand Up @@ -110,21 +115,20 @@ jobs:
with:
path: _build/*.rpm

publish_assets:
name: Publish assets
needs: build
runs-on: ubuntu-latest

steps:
- name: Download all artifacts
- name: Install gh
if: ${{ env.IS_RELEASE == 'true' }}
uses: actions/download-artifact@v3

run: |
yum -y install dnf
dnf -y install 'dnf-command(config-manager)'
dnf -y config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
dnf -y install gh

- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["*/*.tar.gz", "*/*.rpm"]'
GITHUB_TOKEN: ${{ github.token }}
tag: ${{ github.event.inputs.release_tag }}
run: |
gh release upload "$tag" _build/*.tar.gz _build/*.rpm


74 changes: 51 additions & 23 deletions .github/workflows/new_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,54 @@ on:
description: "Run all tests (true/false)"
required: true
jobs:
release:
runs-on: ubuntu-20.04
outputs:
url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Release creation
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.release_tag }}
release_name: ${{ github.event.inputs.release_name }}
body: |
Please complete description


ubuntu:
name: Release - Ubuntu
needs: release
uses: ./.github/workflows/ubuntu.yml
with:
run-tests: ${{ fromJSON(inputs.run-tests) }}
release:
name: Release pushed tag
runs-on: ubuntu-20.04
steps:
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.release_tag }}
title: ${{ github.event.inputs.release_name }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="$title"
--notes="Run tests: $tests"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot to define $tests above (section env)




ubuntu:
name: Release - Ubuntu
needs: release
uses: ./.github/workflows/ubuntu.yml
with:
run-tests: ${{ fromJSON(inputs.run-tests) }}

windows:
name: Release - Windows
needs: release
uses: ./.github/workflows/windows-vcpkg.yml
with:
run-tests: ${{ fromJSON(inputs.run-tests) }}

centos7:
name: Release - centos7
needs: release
uses: ./.github/workflows/centos7.yml
with:
run-tests: ${{ fromJSON(inputs.run-tests) }}

oracle8:
name: Release - oracle8
needs: release
uses: ./.github/workflows/oracle8.yml
with:
run-tests: ${{ fromJSON(inputs.run-tests) }}

user_guide:
name: User Guide
needs: release
uses: ./.github/workflows/build-userguide.yml
with:
run-tests: ${{ fromJSON(inputs.run-tests) }}
32 changes: 17 additions & 15 deletions .github/workflows/oracle8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ on:
- develop
schedule:
- cron: '21 2 * * *'
workflow_call:
inputs:
run-tests:
required: true
type: boolean

env:
GITHUB_TOKEN: ${{ github.token }}
IS_RELEASE: ${{ github.event_name == 'release' && github.event.action == 'created' }}
IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' }}
IS_PUSH: ${{ github.event_name == 'push' }}

jobs:
Expand All @@ -33,7 +38,7 @@ jobs:

- name: Install libraries
run: |
dnf install -y epel-release git cmake wget rpm-build redhat-lsb-core
dnf install -y epel-release git cmake wget rpm-build redhat-lsb-core
dnf install -y unzip libuuid-devel boost-test boost-devel gcc-toolset-10-toolchain zlib-devel

- name: Checkout
Expand Down Expand Up @@ -99,21 +104,18 @@ jobs:
with:
path: _build/*.rpm

publish_assets:
name: Publish assets
needs: build
runs-on: ubuntu-latest

steps:
- name: Download all artifacts
- name: Install gh
if: ${{ env.IS_RELEASE == 'true' }}
uses: actions/download-artifact@v3

run: |
dnf -y install 'dnf-command(config-manager)'
dnf -y config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
dnf -y install gh

- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["*/*.tar.gz", "*/*.rpm"]'
GITHUB_TOKEN: ${{ github.token }}
tag: ${{ github.event.inputs.release_tag }}
run: |
gh release upload "$tag" _build/*.tar.gz _build/*.rpm

Loading
Loading