Skip to content

Commit

Permalink
Create release automatically.
Browse files Browse the repository at this point in the history
  • Loading branch information
coreprocess committed May 9, 2021
1 parent 000f5e9 commit 1e786be
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish
name: PyPI

on:
push:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
push:
branches:
- publish
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Create release
uses: actions/github-script@v4
with:
id: create-release
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const version = require('fs').readFileSync('.version', 'utf8');
const { data: release } = await github.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: 'v' + version,
target_commitish: '${{ github.sha }}',
name: 'v' + version,
draft: false,
prerelease: false,
});
console.log(`::set-output name=release_id::${release.id}`);
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.4
0.1.5

0 comments on commit 1e786be

Please sign in to comment.