Skip to content
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
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

name: Build .NET lib

permissions:
contents: write
actions: read

on:
push:
branches: ["main"]
Expand Down Expand Up @@ -39,11 +43,9 @@ jobs:
echo Next version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT

- name: Make version info file
run: |
cat > cli-version.json << EOF
{
"CLI": "${{steps.next-ver.output.VERSION}}"
"CLI": "$VERSION"
}
EOF

Expand Down
26 changes: 19 additions & 7 deletions .github/workflows/make_release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

name: Release

permissions:
contents: write
actions: read

on:

workflow_dispatch:
Expand All @@ -12,10 +16,6 @@ on:
env:
LOCAL_ARTIFACTS: ${{ github.workspace }}/local_artifacts

permissions:
contents: write
actions: read

jobs:

prepare:
Expand All @@ -24,26 +24,38 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Grab artifacts
- name: Grab build artifacts
uses: dawidd6/action-download-artifact@v11
with:
github_token: ${{secrets.GITHUB_TOKEN}}
name: TeamTools.*
name_is_regexp: true
workflow: ci.yml
workflow_conclusion: completed
branch: main
skip_unpack: true
path: ${{ env.LOCAL_ARTIFACTS }}

- name: Grab cli-version artifact
uses: dawidd6/action-download-artifact@v11
with:
github_token: ${{secrets.GITHUB_TOKEN}}
name: cli-version.json
workflow: ci.yml
workflow_conclusion: completed
branch: main

- name: Detect versions
id: get-tag
run: |
TAG=$(jq -r '.CLI' ${{ env.LOCAL_ARTIFACTS }}/cli-version.json)
TAG=$(jq -r '.CLI' 'cli-version.json')
echo "TAG=v$TAG" >> $GITHUB_OUTPUT

- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "${{ env.LOCAL_ARTIFACTS }}/*.zip"
generateReleaseNotes: true
generateReleaseNotes: false
draft: true
name: ${{ steps.get-tag.outputs.TAG}}
tag: ${{ steps.get-tag.outputs.TAG}}
Loading