diff --git a/.github/workflows/agl.yml b/.github/workflows/agl.yml new file mode 100644 index 00000000..430b5209 --- /dev/null +++ b/.github/workflows/agl.yml @@ -0,0 +1,59 @@ +on: + push: + tags: + - release* # You will need to provide a tag of the form 'relase_ ...' with your push command: + # For example git tag -a release_with_a_bug_fix -m "bug fix" && git push origin release_with_a_bug_fix +name: Create Release + +jobs: + build: + name: Create Release + runs-on: windows-latest + steps: + - name: Checkout code + uses: actions/checkout@master + - name: Create Release + id: create_release + uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + deploy: + runs-on: windows-latest + steps: + - name: Checkout Code + uses: actions/checkout@v1 + + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v1.0.2 + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' + + - name: Restore NuGet Packages + run: nuget restore GraphLayout/GraphLayout.sln + + - name: Build agl.csproj + run: msbuild GraphLayout\tools\agl\agl.csproj /p:Configuration=Release /p:Platform="AnyCPU" /p:DeployOnBuild=true /p:PublishProfile=FolderProfile + + - name: aglzip + run: 7z a agl.zip .\GraphLayout\tools\agl\bin\Release -r + + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: agl.zip + asset_name: agl.zip + tag: ${{ github.ref }} + overwrite: true + body: "The zip file of agl driver" + diff --git a/README.md b/README.md index 50597f71..a1232fe2 100644 --- a/README.md +++ b/README.md @@ -115,5 +115,3 @@ To invoke the action do the following. Create a new tag in the form "release*". For example, "git tag -a release_11 -m "some comment here"". Then execute git push with this tag: "git push origin release_11". These should trigger the release creation. - -