Skip to content

Commit

Permalink
gha: auto-release work.
Browse files Browse the repository at this point in the history
  • Loading branch information
baracudda committed Feb 2, 2024
1 parent edf9fa1 commit 62d5f30
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tag-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
runs-on: ubuntu-latest
outputs:
VERSION_STR: ${{ steps.config_step.outputs.VERSION_STR }}
permissions: write-all
permissions:
contents: write
steps:
- name: "Create Version"
id: config_step
Expand Down
35 changes: 23 additions & 12 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,35 @@ on:
- master

jobs:
create-release:
build_cfg:
runs-on: ubuntu-latest
outputs:
VERSION_STR: ${{ steps.config_step.outputs.VERSION_STR }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: "Create Version"
id: version_cfg
- name: "Create Version STR"
id: config_step
run: |-
VER_BUILD=$(date +%-H%M)
VERSION_NUM="v$(date +%y).$(date +%-m).$(date +%-d)-${VER_BUILD:0:3}"
echo "VERSION_NUM=${VERSION_NUM}" >> $GITHUB_OUTPUT
VERSION_STR="v$(date +%y).$(date +%-m).$(date +%-d)-${VER_BUILD:0:3}"
echo "VERSION_STR=${VERSION_STR}" >> $GITHUB_OUTPUT
- name: "Tag release"
uses: actions/create-release@v1
- name: "Create Release"
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version_cfg.outputs.VERSION_NUM }}
release_name: ${{ steps.version_cfg.outputs.VERSION_NUM }}
draft: false
prerelease: false
tag_name: ${{ steps.config_step.outputs.VERSION_STR }}
release_name: ${{ steps.config_step.outputs.VERSION_STR }}
generate_release_notes: true

build_node_app:
needs: [build_cfg]
name: "Build node tarball with tag [${{ needs.build_cfg.outputs.VERSION_STR }}]"
uses: ./.github/workflows/util-build-node-app.yml
secrets: inherit
with:
version_str: ${{ needs.build_cfg.outputs.VERSION_STR }}

0 comments on commit 62d5f30

Please sign in to comment.