🔖 chore(release): prepare for v0.0.6 #8
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 | |
steps: | |
- name: Configure GPG key | |
run: | | |
echo -n ${{ secrets.GPG_PRIVATE_KEY }} | base64 --decode | gpg --import | |
- name: Configure Git | |
run: | | |
git config --global user.signingkey 5A0CE9AF76DFF0A291BF48F81ECA47E21055F162 | |
git config --global commit.gpgsign true | |
git config --global user.name "welpo" | |
git config --global user.email "[email protected]" | |
- 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 and git-cliff | |
run: pip install poetry git-cliff | |
- name: Configure PyPI token | |
run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | |
# - 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 "$(git-cliff --latest --strip all)" | |
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: 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 |