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

Regex does not work in github actions #42

Merged
merged 1 commit into from
Mar 22, 2024
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
13 changes: 10 additions & 3 deletions .github/workflows/release-github-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ name: "Release on Github"

on:
workflow_call:

inputs:
publish-to-github-maven-registry:
default: true
type: boolean
description: "Skip publish-to-github-maven-registry if false"
jobs:
create-github-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Create github release
id: create_release
Expand All @@ -23,7 +29,7 @@ jobs:

publish-to-github-maven-registry:
uses: ./.github/workflows/build-all-template.yml
if: ${{ github.ref_name =~ ^\d+\.\d+\.\d+\.\d+$ }}
if: ${{inputs.publish-to-github-maven-registry}}
with:
release: true
secrets:
Expand All @@ -33,6 +39,8 @@ jobs:


upload-plugin-to-release:
permissions:
contents: write
needs: [ create-github-release]
runs-on: ubuntu-latest
steps:
Expand All @@ -51,6 +59,5 @@ jobs:
asset_path: artifacts/idea-plugin/build/distributions/chutney-idea-plugin-${{ github.ref_name }}.zip
asset_name: chutney-idea-plugin-${{ github.ref_name }}.zip
asset_content_type: application/zip



28 changes: 28 additions & 0 deletions .github/workflows/release-to-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Release to github registry"

on:
push:
tags:
- '[1-9]+.[0-9]+.[0-9]+.[0-9]+'

jobs:
build:
uses: ./.github/workflows/build-all-template.yml
with:
skipTests: true
cache-artifacts: |
chutney/packaging/local-dev/target/chutney-local-dev-*.jar
idea-plugin/build/distributions/*.zip
chutney/ui/dist

release-github:
needs: [ build ]
uses: ./.github/workflows/release-github-template.yml

release-docker:
needs: [ build ]
uses: ./.github/workflows/release-docker-template.yml
with:
version: ${{needs.build.outputs.PROJECT_VERSION}}
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: "Release all"
name: "Release to OSSRH"

on:
push:
tags:
- '*.*.*'
- '*.*.*.*'
- '[1-9]+.[0-9]+.[0-9]+'

jobs:
build:
Expand All @@ -19,9 +18,10 @@ jobs:
release-github:
needs: [ build ]
uses: ./.github/workflows/release-github-template.yml
with:
publish-to-github-maven-registry: false

release-to-OSSRH:
if: ${{ github.ref_name =~ ^\d+\.\d+\.\d+$) }}
needs: [ build ]
uses: ./.github/workflows/build-all-template.yml
with:
Expand All @@ -41,4 +41,3 @@ jobs:
version: ${{needs.build.outputs.PROJECT_VERSION}}
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}

Loading