Skip to content

Commit edc274e

Browse files
committed
add release workflow
1 parent f0fe0c4 commit edc274e

2 files changed

Lines changed: 52 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Build Windows
22

33
on:
44
push:
5-
branches: [ $default-branch, feature/actions ]
5+
branches: [ $default-branch ]
6+
tags:
7+
- v*
68
pull_request:
79
branches: [ $default-branch ]
810

@@ -26,4 +28,17 @@ jobs:
2628
uses: actions/upload-artifact@v4
2729
with:
2830
name: executable
29-
path: ${{github.workspace}}/build/Release/CppDiscType.exe
31+
path: ${{github.workspace}}/build/Release/CppDiscType.exe
32+
33+
- name: Turn slashes
34+
if: startsWith(github.ref, 'refs/tags/')
35+
run: |
36+
$Path = "${{github.workspace}}" -replace '\\','/'
37+
echo $PATH
38+
echo "WORKSPACE_PATH=$Path" >> $env:GITHUB_ENV
39+
40+
- name: Release
41+
uses: softprops/action-gh-release@v2
42+
if: startsWith(github.ref, 'refs/tags/')
43+
with:
44+
files: ${{env.WORKSPACE_PATH}}/build/Release/CppDiscType.exe

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# CppDiscType
2+
3+
This is a program to specify the disc type, which is currently in the cd/dvd/blu ray drive.
4+
5+
## Usage
6+
7+
Execute the program.
8+
9+
The return value of the program is mapped to the following enum:
10+
11+
```cpp
12+
typedef enum _IMAPI_MEDIA_PHYSICAL_TYPE {
13+
IMAPI_MEDIA_TYPE_UNKNOWN = 0,
14+
IMAPI_MEDIA_TYPE_CDROM = 0x1,
15+
IMAPI_MEDIA_TYPE_CDR = 0x2,
16+
IMAPI_MEDIA_TYPE_CDRW = 0x3,
17+
IMAPI_MEDIA_TYPE_DVDROM = 0x4,
18+
IMAPI_MEDIA_TYPE_DVDRAM = 0x5,
19+
IMAPI_MEDIA_TYPE_DVDPLUSR = 0x6,
20+
IMAPI_MEDIA_TYPE_DVDPLUSRW = 0x7,
21+
IMAPI_MEDIA_TYPE_DVDPLUSR_DUALLAYER = 0x8,
22+
IMAPI_MEDIA_TYPE_DVDDASHR = 0x9,
23+
IMAPI_MEDIA_TYPE_DVDDASHRW = 0xa,
24+
IMAPI_MEDIA_TYPE_DVDDASHR_DUALLAYER = 0xb,
25+
IMAPI_MEDIA_TYPE_DISK = 0xc,
26+
IMAPI_MEDIA_TYPE_DVDPLUSRW_DUALLAYER = 0xd,
27+
IMAPI_MEDIA_TYPE_HDDVDROM = 0xe,
28+
IMAPI_MEDIA_TYPE_HDDVDR = 0xf,
29+
IMAPI_MEDIA_TYPE_HDDVDRAM = 0x10,
30+
IMAPI_MEDIA_TYPE_BDROM = 0x11,
31+
IMAPI_MEDIA_TYPE_BDR = 0x12,
32+
IMAPI_MEDIA_TYPE_BDRE = 0x13,
33+
IMAPI_MEDIA_TYPE_MAX = 0x13
34+
} IMAPI_MEDIA_PHYSICAL_TYPE, *PIMAPI_MEDIA_PHYSICAL_TYPE;
35+
```

0 commit comments

Comments
 (0)