Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
48 lines (46 loc) · 1.57 KB
/
Copy pathaction.yml
File metadata and controls
48 lines (46 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: CSDA Version
description: Calculate the next CSDA version for this repository
branding:
icon: radio
color: blue
outputs:
version:
description: The next CSDA version
value: ${{ steps.calculate.outputs.version }}
release-please-config:
description: Path to the release-please config file
value: ${{ steps.release-please-config.outputs.config-file }}
runs:
using: composite
steps:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.13"
- name: Install
shell: bash
run: python -m pip install ${{ github.action_path }}
- name: Fetch tags
shell: bash
run: git fetch --tags
- name: Get last tag
shell: bash
id: last-tag
run: |
LAST_TAG=$(git tag --list 'v*.*.*' --sort=-version:refname | head -n 1)
echo "tag=$LAST_TAG" >> "$GITHUB_OUTPUT"
- name: Fetch csda-version.txt
shell: bash
id: csda-version
run: |
CSDA_VERSION=$(curl -s https://raw.githubusercontent.com/NASA-IMPACT/csda-version/refs/heads/main/csda-version.txt | tr -d '[:space:]')
echo "version=$CSDA_VERSION" >> "$GITHUB_OUTPUT"
- id: calculate
shell: bash
run: |
NEXT_VERSION=$(csda-version next-version "${{ steps.csda-version.outputs.version }}" "${{ steps.last-tag.outputs.tag }}")
echo "version=$NEXT_VERSION" >> "$GITHUB_OUTPUT"
- name: release-please config
id: release-please-config
shell: bash
run: |
echo "config-file=release-please-config.json" >> "$GITHUB_OUTPUT"