|
67 | 67 | " - [Version update](#Version-update)\n", |
68 | 68 | " - [Exercise on version update automation](#Exercise-on-version-update-automation)\n", |
69 | 69 | " - [Releasing](#Releasing)\n", |
70 | | - " - [Exercise on releasing automation](#Exercise-on-releasing-automation)" |
| 70 | + " - [Exercises on releasing automation](#Exercises-on-releasing-automation)" |
71 | 71 | ] |
72 | 72 | }, |
73 | 73 | { |
|
139 | 139 | "3. Clone the package to your local machine: `git clone <url-to-your-repository>`.\n", |
140 | 140 | "\n", |
141 | 141 | "<div class=\"alert alert-block alert-info\">\n", |
142 | | - "In the following, we will always assume that <code>mypackage</code> is the package you are working on (other yours or the one you have forked).\n", |
| 142 | + "In the following, we will always assume that <code>mypackage</code> is the package you are working on (either yours or the one you have forked).\n", |
143 | 143 | "</div>\n" |
144 | 144 | ] |
145 | 145 | }, |
|
330 | 330 | "pre-commit run --all-files\n", |
331 | 331 | "```\n", |
332 | 332 | "This command will run all the pre-commit hooks on all the files in the repository.\n", |
| 333 | + "However, this command will fail if there is no `.pre-commit-config.yaml` file in the current directory.\n", |
| 334 | + "We will discuss the `.pre-commit-config.yaml` file in the next section.\n", |
333 | 335 | "\n", |
334 | 336 | "Usually, one would run pre-commit on the files that are about to be committed.\n", |
335 | 337 | "It turns out that pre-commit can do that for us.\n", |
|
1524 | 1526 | "\n", |
1525 | 1527 | "on: push\n", |
1526 | 1528 | "\n", |
| 1529 | + "jobs:\n", |
1527 | 1530 | " tests:\n", |
1528 | 1531 | " name: Test Suite\n", |
1529 | 1532 | " runs-on: ubuntu-latest\n", |
|
1610 | 1613 | "To update the version, run the following command:\n", |
1611 | 1614 | "\n", |
1612 | 1615 | "```bash\n", |
1613 | | - "bumpver update --minor --dry-run\n", |
| 1616 | + "bumpver update --minor --dry\n", |
1614 | 1617 | "```\n", |
1615 | | - "Since the `--dry-run` flag is used, the version will not be updated, but the proposed changes will be printed to the console.\n", |
| 1618 | + "Since the `--dry` flag is used, the version will not be updated, but the proposed changes will be printed to the console.\n", |
1616 | 1619 | "In the example above we expect only the `MINOR` part of the version to be updated, as we have used the `--minor` flag.\n", |
1617 | | - "Once you are happy with the changes, remove the `--dry-run` flag and run the command again.\n", |
| 1620 | + "Once you are happy with the changes, remove the `--dry` flag and run the command again.\n", |
1618 | 1621 | "\n", |
1619 | 1622 | "\n", |
1620 | 1623 | "For more information on the configuration, see [bumpver documentation](https://github.com/mbarkhau/bumpver#readme)." |
|
1706 | 1709 | "\n", |
1707 | 1710 | "Finally, we want to add a release to GitHub.\n", |
1708 | 1711 | "```yaml\n", |
1709 | | - " - uses: softprops/action-gh-release@v0.1.14\n", |
1710 | | - " name: Create release\n", |
| 1712 | + " - name: Create release\n", |
| 1713 | + " uses: softprops/action-gh-release@v0.1.14\n", |
1711 | 1714 | " with:\n", |
1712 | 1715 | " files: |\n", |
1713 | 1716 | " dist/*\n", |
|
1731 | 1734 | "id": "78322de9", |
1732 | 1735 | "metadata": {}, |
1733 | 1736 | "source": [ |
1734 | | - "## Exercise on releasing automation\n", |
| 1737 | + "## Exercises on releasing automation\n", |
| 1738 | + "\n", |
| 1739 | + "- Configure the release workflow in your package.\n", |
| 1740 | + "You can use all steps from the example above except from the `Build and publish` step.\n", |
| 1741 | + "This step should be replaced with the following one:\n", |
1735 | 1742 | "\n", |
1736 | | - "- Configure the release workflow in your package using `test.pypi.org`.\n", |
| 1743 | + "```yaml\n", |
| 1744 | + " - name: Build and publish\n", |
| 1745 | + " run: flit build\n", |
| 1746 | + "```\n", |
1737 | 1747 | "- Update the version of your package using `bumpver`.\n", |
1738 | | - "- Check that the release workflow is triggered and the package is released on `test.pypi.org`." |
| 1748 | + "\n", |
| 1749 | + "**Optional:**\n", |
| 1750 | + "\n", |
| 1751 | + "- Only if you are working with your own package, you can try to release it on PyPI." |
1739 | 1752 | ] |
1740 | 1753 | } |
1741 | 1754 | ], |
|
0 commit comments