Skip to content

Commit 06e751f

Browse files
Merge pull request #12 from ferretbreeder/ci_cd
Got the CI/CD action working!
2 parents bfa2f3c + 10e550e commit 06e751f

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
branches: [ "main" ]
1111

1212
permissions:
13-
contents: read
13+
contents: write
1414

1515
jobs:
1616
build:
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
pip install flake8 pytest pyinstaller
29+
pip install flake8 pytest pyinstaller beautifulsoup4
3030
- name: Lint with flake8
3131
run: |
3232
# stop the build if there are Python syntax errors or undefined names
@@ -35,4 +35,31 @@ jobs:
3535
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3636
- name: Build executable
3737
run: |
38-
pyinstaller --onefile link_editor.py
38+
pyinstaller --onefile link_editor.py --name utm-link-editor-windows-amd64
39+
- name: Upload executable
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: utm-link-editor-windows-amd64
43+
path: dist/utm-link-editor-windows-amd64.exe
44+
- name: Create Release
45+
id: create_release
46+
uses: actions/create-release@v1
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
49+
with:
50+
tag_name: v0.0.95
51+
release_name: Release v0.0.95
52+
body: |
53+
another test
54+
draft: false
55+
prerelease: false
56+
- name: Upload Release Asset
57+
id: upload-release-asset
58+
uses: actions/upload-release-asset@v1
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
with:
62+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
63+
asset_path: dist/utm-link-editor-windows-amd64.exe
64+
asset_name: utm-link-editor-windows-amd64.exe
65+
asset_content_type: application/zip

0 commit comments

Comments
 (0)