Skip to content

Commit

Permalink
chore: Test workflow split
Browse files Browse the repository at this point in the history
  • Loading branch information
jag3dagster committed Feb 4, 2024
1 parent f94bc9f commit 8a3f47f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/actions/split-tag.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const core = require("@actions/core");

const tag = core.getInput('tag', { required: true });
const tag = process.env.tag;
const splitTag = tag.split('/');

console.log(tag);
Expand Down
49 changes: 29 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release
run-name: "Release Tag: ${{ github.ref_name }}"

on:
push:
Expand All @@ -12,23 +13,31 @@ jobs:

steps:
- name: Split tag
run: .github/actions/split-tag.js
with:
tag: ${{ github.ref_name }}

- name: Checkout source code
uses: actions/[email protected]
with:
fetch-depth: 0
ref: ${{ github.events.repository.default_branch }}

- name: Setup dotnet 6.0.x
uses: actions/[email protected]
with:
dotnet-version: '6.0.x'

- name: Install dependencies
run: dotnet restore ${{ github.ref_name }}

- name: Build
run: dotnet build ${{ github.ref_name }} --configuration Release
env:
TAG: ${{ github.ref_name }}
id: split
run: |
echo "::set-output name=project::${TAG##/*}"
echo "::set-output name=version::${TAG##*/}"
- name: Test tag split
run: |
echo ${{ steps.split.outputs.project }}
echo ${{ steps.split.outputs.verison }}
# - name: Checkout source code
# uses: actions/[email protected]
# with:
# fetch-depth: 0
# ref: ${{ github.events.repository.default_branch }}

# - name: Setup dotnet 6.0.x
# uses: actions/[email protected]
# with:
# dotnet-version: '6.0.x'

# - name: Install dependencies
# run: dotnet restore ${{ github.ref_name }}

# - name: Build
# run: dotnet build ${{ github.ref_name }} --configuration Release

0 comments on commit 8a3f47f

Please sign in to comment.