🔖 chore(release): prepare for v0.0.6 #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Deployment | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
deploy: | |
name: Deploy and release | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
env: | |
GIT_PAGER: cat | |
GIT_AUTHOR_NAME: github-actions | |
GIT_AUTHOR_EMAIL: [email protected] | |
steps: | |
- name: Checkout dōteki | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install Poetry | |
run: pip install poetry | |
- name: Configure PyPI token | |
run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | |
- name: Generate the changelog | |
uses: orhun/git-cliff-action@main | |
id: git-cliff | |
with: | |
config: cliff.toml | |
args: --latest --strip all | |
env: | |
OUTPUT: CHANGES.md | |
# - name: Publish to PyPI | |
# run: poetry publish --build | |
- name: Create GitHub release | |
run: | | |
gh release create ${{ github.ref_name }} \ | |
--title "Release ${{ github.ref_name }}" \ | |
--notes "${{ steps.git-cliff.outputs.content }}" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Update doteki-action. | |
- name: Clone doteki-action | |
uses: actions/checkout@v4 | |
with: | |
repository: 'welpo/doteki-action' | |
fetch-depth: 0 | |
token: ${{ secrets.ACTIONS_ACCESS_TOKEN }} | |
path: 'doteki-action' | |
- name: Update dōteki version in doteki-action | |
run: | | |
cd doteki-action | |
sed -i "s/doteki\[all\]==[0-9]*\.[0-9]*\.[0-9]*/doteki[all]==${{ github.ref_name }}/g" action.yaml | |
git add action.yaml | |
git commit -m "⬆️️ feat: update dōteki to ${{ github.ref_name }}" | |
- name: Install git-cliff | |
run: pip install git-cliff | |
- name: Run release script in doteki-action | |
run: | | |
cd doteki-action | |
bash release ${{ github.ref_name }} | |
- name: Push changes and tags to doteki-action | |
run: | | |
cd doteki-action | |
git push origin main | |
git push origin --tags |