Skip to content

Commit

Permalink
fix: Fixed jobs variable share problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
real-zony committed Sep 22, 2022
1 parent f597e24 commit ba91108
Showing 1 changed file with 45 additions and 43 deletions.
88 changes: 45 additions & 43 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,59 @@ name: .NET
on:
push:
branches: [ dev ]
# paths:
# - "versions/**"
# paths:
# - "versions/**"
pull_request:
branches: [ dev ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get build version
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')${{github.run_number}}"
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Publish
working-directory: ./src/ZonyLrcTools.Cli
run: |
ls -a
chmod +x ./publish.sh
./publish.sh
mv ./TempFiles ../../
shell: bash
env:
PUBLISH_VERSION: ${{ steps.date.outputs.date }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: release-files
path: |
./TempFiles
./versions/release.md
- name: Get build version
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')${{github.run_number}}"
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Publish
working-directory: ./src/ZonyLrcTools.Cli
run: |
ls -a
chmod +x ./publish.sh
./publish.sh
mv ./TempFiles ../../
shell: bash
env:
PUBLISH_VERSION: ${{ steps.date.outputs.date }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: release-files
path: |
./TempFiles
./versions/release.md
outputs:
version: ${{ steps.date.outputs.date }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: release-files
path: .
- name: Upload Release
uses: ncipollo/release-action@v1
with:
artifacts: "./TempFiles/*.zip"
token: ${{ secrets.GITHUBACTIONS }}
tag: ZonyLrcToolsX_Alpha.${{ steps.date.outputs.date }}
commit: dev
bodyFile: ./versions/release.md
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: release-files
path: .
- name: Upload Release
uses: ncipollo/release-action@v1
with:
artifacts: "./TempFiles/*.zip"
token: ${{ secrets.GITHUBACTIONS }}
tag: ZonyLrcToolsX_Alpha.${{ needs.build.outputs.version }}
commit: dev
bodyFile: ./versions/release.md

0 comments on commit ba91108

Please sign in to comment.