| 1 |
name: Tag and Release |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ release ] |
| 6 |
|
| 7 |
workflow_dispatch: |
| 8 |
|
| 9 |
|
| 10 |
jobs: |
| 11 |
|
| 12 |
Release: |
| 13 |
|
| 14 |
runs-on: ubuntu-latest |
| 15 |
|
| 16 |
steps: |
| 17 |
|
| 18 |
- name: Checkout the repo |
| 19 |
uses: actions/checkout@v2 |
| 20 |
|
| 21 |
- name: Extract values |
| 22 |
run: | |
| 23 |
version="$(cat VERSION | xargs)" |
| 24 |
echo $version |
| 25 |
version_array=($version) |
| 26 |
echo ${version_array[2]} |
| 27 |
echo ::set-output name=fetk-version::${version_array[2]} |
| 28 |
shell: bash |
| 29 |
id: job-values |
| 30 |
|
| 31 |
- name: Create tag |
| 32 |
uses: tvdias/[email protected] |
| 33 |
with: |
| 34 |
repo-token: "${{ secrets.RELEASE_TOKEN }}" |
| 35 |
tag: ${{ steps.job-values.outputs.fetk-version }} |
| 36 |
|
| 37 |
- name: Extract release text |
| 38 |
run: | |
| 39 |
./extract_section.sh -f CHANGELOG.md -v ${{ steps.job-values.outputs.fetk-version }} > release.md |
| 40 |
cat release.md |
| 41 |
|
| 42 |
- name: Create Release |
| 43 |
uses: softprops/action-gh-release@v1 |
| 44 |
env: |
| 45 |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} |
| 46 |
with: |
| 47 |
body_path: release.md |
| 48 |
tag_name: ${{ steps.job-values.outputs.fetk-version }} |