-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (93 loc) · 2.72 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: publish
on:
push:
branches: [ "publisher" ]
tags:
- '*'
jobs:
mingw64:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Fetch Sources
uses: actions/checkout@v3
with:
submodules: true
- uses: oprypin/find-latest-tag@v1
id: gettag
with:
repository: PerryWerneck/vmdetect
releases-only: true
- name: Setup MSys
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: git dos2unix xz mingw-w64-x86_64-gcc pkgconf mingw-w64-x86_64-gettext mingw-w64-x86_64-meson gettext-devel
- name: Run Build
run: |
dos2unix PKGBUILD.mingw
makepkg BUILDDIR=/tmp/pkg -p PKGBUILD.mingw
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.gettag.outputs.tag }}
artifacts: "*.pkg.tar.zst"
allowUpdates: true
draft: false
makeLatest: true
omitBody: true
omitPrereleaseDuringUpdate: true
replacesArtifacts: true
# msvc:
# # https://dvdhrm.github.io/2021/04/21/meson-msvc-github-actions/
# runs-on: windows-latest
# steps:
# - name: Fetch Sources
# uses: actions/checkout@v3
# with:
# submodules: true
# - name: Setup Python
# uses: actions/setup-python@v2
# with:
# python-version: '3.x'
# - name: Install Python Dependencies
# run: pip install meson ninja
# - name: Prepare MSVC
# uses: bus1/cabuild/action/msdevshell@v1
# with:
# architecture: x64
# - name: Prepare Build
# run: meson setup --sbindir=bin build
# - name: Build
# run: meson compile -v -C build vmdetect:executable
# - name: Install
# run: meson install --no-rebuild --destdir=package --tags=runtime -C build
# - name: Pack
# run: |
# cd build\package
# 7z a -r ..\..\msvc-vmdetect-x86_64.zip .
pypi:
runs-on: ubuntu-latest
name: Publish to pypi
environment:
name: pypi
url: https://pypi.org/p/smbios
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Fetch Sources
uses: actions/checkout@v3
with:
submodules: true
- name: Install Packages
run: |
sudo apt-get update
sudo apt-get install --yes python3-dev libdbus-1-dev
- name: Install Python Dependencies
run: pip install meson ninja build
- name: Build package
run: python3 -m build -s
- name: Publishing package
uses: pypa/gh-action-pypi-publish@release/v1