Skip to content

Commit 4ba7df3

Browse files
authored
[Minor][Dev] Update release workflow to make release easy and revise other workflows (#323)
1 parent 000e27b commit 4ba7df3

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.github/workflows/ci-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
- cron: '00 19 * * *'
2323
jobs:
2424
GraphAr-ubuntu-arrow-from-source:
25-
if: ${{ github.ref == 'refs/heads/main' }}
25+
if: ${{ github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphAr' }}
2626
runs-on: ubuntu-latest
2727
steps:
2828
- uses: actions/checkout@v3

.github/workflows/pyspark.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,17 @@ on:
2020
push:
2121
branches:
2222
- main
23+
paths:
24+
- 'spark/**'
25+
- 'pyspark/**'
26+
- '.github/workflows/pyspark.yaml'
2327
pull_request:
2428
branches:
2529
- main
30+
paths:
31+
- 'spark/**'
32+
- 'pyspark/**'
33+
- '.github/workflows/pyspark.yaml'
2634

2735
concurrency:
2836
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}

.github/workflows/release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ on:
1818
push:
1919
tags:
2020
- "v*"
21+
workflow_dispatch:
2122

23+
concurrency:
24+
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
25+
cancel-in-progress: true
2226

2327
# Automatically create a GitHub Release, with release details specified (the relevant commits)
2428
jobs:
@@ -30,9 +34,17 @@ jobs:
3034
os: [ubuntu-latest]
3135

3236
steps:
33-
- name: Release
37+
- name: Extract tag name
38+
id: tag
39+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphAr' }}
40+
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
41+
42+
- name: Cut a versioned release
3443
uses: "marvinpinto/action-automatic-releases@latest"
44+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphAr' }}
3545
with:
3646
repo_token: "${{ secrets.GITHUB_TOKEN }}"
47+
automatic_release_tag: ${{ steps.tag.outputs.TAG }}
3748
draft: true
3849
prerelease: false
50+
title: "GraphAr ${{ steps.tag.outputs.TAG }}"

0 commit comments

Comments
 (0)