Merge pull request #53 from Petteroe/feature/add-stream-response #91
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release-assets | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
DOCKER_USER: berthertogen | |
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
REPO_NAME: ${{secrets.REPO_NAME}} | |
jobs: | |
release-asset: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set version | |
uses: actions/github-script@v4 | |
id: set_version | |
with: | |
script: | | |
const tag = '${{ github.ref_name }}' | |
const tag_no_v = tag.replace('v', '') | |
core.setOutput('tag', tag) | |
core.setOutput('tag-no-v', tag_no_v) | |
- uses: actions/checkout@v3 | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref_name }} | |
release_name: Release ${{ github.ref_name }} | |
draft: true | |
prerelease: true | |
- name: Download artifact | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: build-test-code-scan.yml | |
workflow_conclusion: success | |
- name: Add version files | |
run: | | |
cd assets | |
touch version-${{ steps.set_version.outputs.tag-no-v }} | |
zip -d standalone-linux-64.zip "version-*" | |
zip -ur standalone-linux-64.zip version-${{ steps.set_version.outputs.tag-no-v }} | |
zip -d standalone-windows-64.zip "version-*" | |
zip -ur standalone-windows-64.zip version-${{ steps.set_version.outputs.tag-no-v }} | |
- name: Create nuget package | |
run: dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=${{ steps.set_version.outputs.tag-no-v }} --output nupkgs | |
working-directory: ./src/Weasyprint.Wrapped | |
- name: Add github source | |
run: dotnet nuget add source --username [email protected] --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/berthertogen/index.json" | |
working-directory: ./src/Weasyprint.Wrapped | |
- name: Push nuget package to github | |
run: dotnet nuget push "Weasyprint.Wrapped.${{ steps.set_version.outputs.tag-no-v }}.nupkg" --api-key "${{ secrets.GITHUB_TOKEN }}" --source "github" | |
working-directory: ./src/Weasyprint.Wrapped/nupkgs | |
- name: Push nuget package to nuget | |
run: dotnet nuget push "Weasyprint.Wrapped.${{ steps.set_version.outputs.tag-no-v }}.nupkg" --api-key "${{ secrets.NUGET_TOKEN }}" --source https://api.nuget.org/v3/index.json | |
working-directory: ./src/Weasyprint.Wrapped/nupkgs | |
- name: Upload nuget package | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: "./src/Weasyprint.Wrapped/nupkgs/Weasyprint.Wrapped.${{ steps.set_version.outputs.tag-no-v }}.nupkg" | |
asset_name: "Weasyprint.Wrapped.${{ steps.set_version.outputs.tag-no-v }}.nupkg" | |
asset_content_type: application/zip | |
- name: Upload release asset linux | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: assets/standalone-linux-64.zip | |
asset_name: standalone-linux-64.zip | |
asset_content_type: application/zip | |
- name: Upload release asset windows | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: assets/standalone-windows-64.zip | |
asset_name: standalone-windows-64.zip | |
asset_content_type: application/zip | |
push-image-to-docker-hub: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set version | |
uses: actions/github-script@v4 | |
id: set_version | |
with: | |
script: | | |
const tag = '${{ github.ref_name }}' | |
const tag_no_v = tag.replace('v', '') | |
core.setOutput('tag', tag) | |
core.setOutput('tag-no-v', tag_no_v) | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: berthertogen | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Build and push 8.0 | |
uses: docker/build-push-action@v2 | |
with: | |
context: .docker/net-sdk-weayprint/ | |
file: .docker/net-sdk-weayprint/Dockerfile | |
push: true | |
tags: berthertogen/net-sdk-8-weayprint:latest, berthertogen/net-sdk-8-weayprint:${{ steps.set_version.outputs.tag-no-v }} |