Update push_master.yml
This commit is contained in:
51
.github/workflows/push_master.yml
vendored
51
.github/workflows/push_master.yml
vendored
@@ -18,48 +18,59 @@ jobs:
|
|||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
|
- name: Setup GitVersion
|
||||||
|
uses: gittools/actions/gitversion/setup@v0.9.7
|
||||||
|
with:
|
||||||
|
versionSpec: 5.x
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install pylint
|
pip install pylint
|
||||||
- name: Analysing the code with pylint
|
- name: Analysing the code with pylint
|
||||||
run: pylint --exit-zero $(git ls-files '*.py')
|
run: pylint --exit-zero $(git ls-files '*.py')
|
||||||
publish:
|
|
||||||
needs: check
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Setup GitVersion
|
|
||||||
uses: gittools/actions/gitversion/setup@v0.9.7
|
|
||||||
with:
|
|
||||||
versionSpec: 5.x
|
|
||||||
- name: Determine Version
|
- name: Determine Version
|
||||||
uses: gittools/actions/gitversion/execute@v0.9.7
|
uses: gittools/actions/gitversion/execute@v0.9.7
|
||||||
id: gitversion
|
id: gitversion
|
||||||
with:
|
with:
|
||||||
useConfigFile: true
|
useConfigFile: true
|
||||||
configFilePath: ./.github/config/gitversion.yml
|
configFilePath: ./.github/config/gitversion.yml
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: nuget
|
||||||
|
path: |
|
||||||
|
./
|
||||||
|
!./.github/
|
||||||
|
!./.gitignore
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.gitversion.outputs.SemVer }}
|
||||||
|
publish:
|
||||||
|
needs: check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download artifact
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: nuget
|
||||||
|
path: ./
|
||||||
- name: Create zip
|
- name: Create zip
|
||||||
uses: ihiroky/archive-action@v1
|
uses: ihiroky/archive-action@v1
|
||||||
with:
|
with:
|
||||||
root_dir: ./
|
root_dir: ./
|
||||||
file_path: ipsec_exporter_${{steps.gitversion.outputs.version}}.zip
|
file_path: ipsec_exporter_${{needs.build.outputs.version}}.zip
|
||||||
- name: Create tar.gz
|
- name: Create tar.gz
|
||||||
uses: ihiroky/archive-action@v1
|
uses: ihiroky/archive-action@v1
|
||||||
with:
|
with:
|
||||||
root_dir: ./
|
root_dir: ./
|
||||||
file_path: ipsec_exporter_${{steps.gitversion.outputs.version}}.tar.gz
|
file_path: ipsec_exporter_${{needs.build.outputs.version}}.tar.gz
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{steps.gitversion.outputs.version}}
|
tag_name: ${{needs.build.outputs.version}}
|
||||||
release_name: ${{steps.gitversion.outputs.version}}
|
release_name: ${{needs.build.outputs.version}}
|
||||||
body_path: ./RELEASE.md
|
body_path: ./RELEASE.md
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
@@ -69,8 +80,8 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
asset_path: ./ipsec_exporter_${{steps.gitversion.outputs.version}}.zip
|
asset_path: ./ipsec_exporter_${{needs.build.outputs.version}}.zip
|
||||||
asset_name: ipsec_exporter_${{steps.gitversion.outputs.version}}.zip
|
asset_name: ipsec_exporter_${{needs.build.outputs.version}}.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
- name: Upload tar.gz archive
|
- name: Upload tar.gz archive
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
@@ -78,7 +89,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
asset_path: ./ipsec_exporter_${{steps.gitversion.outputs.version}}.tar.gz
|
asset_path: ./ipsec_exporter_${{needs.build.outputs.version}}.tar.gz
|
||||||
asset_name: ipsec_exporter_${{steps.gitversion.outputs.version}}.tar.gz
|
asset_name: ipsec_exporter_${{needs.build.outputs.version}}.tar.gz
|
||||||
asset_content_type: application/gzip
|
asset_content_type: application/gzip
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user