Skip to content

Commit

Permalink
Merge pull request #3 from marktsuchida/packaging
Browse files Browse the repository at this point in the history
Packaging; prepare to publish on PyPI
  • Loading branch information
marktsuchida authored Jul 7, 2024
2 parents 0af2dea + 252b932 commit 382fad5
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 3 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
pull_request:
push:
branches:
- main
tags:
- v*

jobs:
publish:
# TODO: needs: [test]
# TODO: Put the conditional at the job level once we have a test job

runs-on: ubuntu-latest

permissions:
id-token: write # For pypa/gh-action-pypi-publish
contents: write # For softprops/action-gh-release

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # For setuptools_scm

- name: Build packages
run: pipx run build

- name: Publish on PyPI
if: >-
github.repository == 'marktsuchida/vcxproj-stream-editor' &&
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1

- name: Create GitHub release
uses: softprops/action-gh-release@v2
if: >-
github.repository == 'marktsuchida/vcxproj-stream-editor' &&
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/v')
with:
generate_release_notes: true
files: "./dist/*"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*~
dist/
*.egg-info/
25 changes: 25 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "vcxproj-stream-editor"
dynamic = ["version"]
description = "Rewrite Visual Studio .vcxproj files without spurious changes"
readme = "README.md"
requires-python = ">= 3.3"
keywords = ["Visual Studio", "MSBuild", "vcxproj", "project", "XML"]
authors = [
{name = "Mark A. Tsuchida"},
{name = "contributors"},
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Topic :: Software Development",
]

[project.urls]
Repository = "https://github.com/marktsuchida/vcxproj-stream-editor"

[tool.setuptools_scm]
6 changes: 3 additions & 3 deletions vcxproj.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Layout-preserving parser/manipulator/writer for Visual Studio 2010 projects
# Layout-preserving parser/manipulator/writer for Visual Studio 2010+ projects

# Copyright (c) 2013 Mark A. Tsuchida
# Copyright 2013-2024 Mark A. Tsuchida and vcxproj-stream-editor contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -22,7 +22,7 @@


"""
Layout-preserving parser/manipulator/writer for Visual Studio 2010 projects
Layout-preserving parser/manipulator/writer for Visual Studio 2010+ projects
Given the following simplified myproject.vcxproj:
<?xml version="1.0" encoding="utf-8"?>
Expand Down

0 comments on commit 382fad5

Please sign in to comment.