Skip to content

Commit

Permalink
get rid of version (#43)
Browse files Browse the repository at this point in the history
Co-authored-by: CommonLoon102 <CommonLoon102@users.noreply.github.com>
  • Loading branch information
CommonLoon102 and CommonLoon102 authored Apr 18, 2021
1 parent 8afeae9 commit e212a4e
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,11 @@ jobs:
- name: Publish
run: dotnet publish ${{ env.app_name }}/${{ env.app_name }}.${{ matrix.config.project }}/${{ env.app_name }}.${{ matrix.config.project }}.csproj --configuration Release --output ${{ env.publish_folder }} --self-contained true -p:PublishSingleFile=${{ matrix.config.is_single_file }} --runtime ${{ matrix.config.runtime }} --framework ${{ matrix.config.framework }}

- name: Get the tag name
id: get_tag_name
if: (github.event_name == 'release' && github.event.action == 'published' && startsWith(github.ref, 'refs/tags/'))
shell: bash
run: echo "::set-output name=TAG_NAME::$(git describe --tags --abbrev=0)"

- name: Create Package
if: (github.event_name == 'release' && github.event.action == 'published' && startsWith(github.ref, 'refs/tags/'))
shell: bash
run: |
filename=${{ env.app_name }}-${{ steps.get_tag_name.outputs.TAG_NAME }}-${{ matrix.config.runtime }}
filename=${{ env.app_name }}-${{ matrix.config.runtime }}
if [[ "${{ runner.os }}" == 'Windows' ]]; then
7z a $filename.zip ./${{ env.publish_folder }}/*
else
Expand All @@ -81,7 +75,7 @@ jobs:
if: (github.event_name == 'release' && github.event.action == 'published' && startsWith(github.ref, 'refs/tags/'))
with:
name: ${{ matrix.config.runtime }} Release
path: ${{ env.app_name }}-${{ steps.get_tag_name.outputs.TAG_NAME }}-${{ matrix.config.runtime }}.zip
path: ${{ env.app_name }}-${{ matrix.config.runtime }}.zip

- uses: actions/upload-artifact@v2
if: (github.event_name == 'push' || github.event_name == 'pull_request')
Expand Down Expand Up @@ -114,19 +108,13 @@ jobs:
runtime: osx-x64
}
steps:
- name: Get the tag name
id: get_tag_name
if: (github.event_name == 'release' && github.event.action == 'published' && startsWith(github.ref, 'refs/tags/'))
shell: bash
run: echo "::set-output name=TAG_NAME::$(git describe --tags --abbrev=0)"

- name: Get release
id: get_release
uses: bruceadams/get-release@v1.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Download extension artifacts
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: ${{ matrix.config.runtime }} Release
Expand All @@ -137,6 +125,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ${{ env.app_name }}-${{ steps.get_tag_name.outputs.TAG_NAME }}-${{ matrix.config.runtime }}.zip
asset_name: ${{ env.app_name }}-${{ steps.get_tag_name.outputs.TAG_NAME }}-${{ matrix.config.runtime }}.zip
asset_path: ${{ env.app_name }}-${{ matrix.config.runtime }}.zip
asset_name: ${{ env.app_name }}-${{ matrix.config.runtime }}.zip
asset_content_type: application/zip

0 comments on commit e212a4e

Please sign in to comment.