Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
configure project
Browse files Browse the repository at this point in the history
  • Loading branch information
tasshi-me committed Apr 4, 2023
1 parent 37947ab commit 35c6f83
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/permission-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: release
on:
push:

jobs:
release:
name: Create release
runs-on: ubuntu-latest
permissions:
contents: write
env:
GH_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
release_tag: ${{ steps.release_tag.outputs.release_tag }}
steps:
- id: release_tag
run: |
release_url=$(gh release create "v-${GITHUB_SHA}" --draft)
release_tag=$(echo $release_url | sed -r "s|^${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/tag/(.*)$|\1|")
echo "release_tag=${release_tag}" >> "$GITHUB_OUTPUT"
sleep 1
rename:
name: Rename release title
needs: release
runs-on: ubuntu-latest
permissions:
contents: write
env:
GH_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: gh release edit ${{ needs.release.outputs.release_tag }} --title "Release v-${GITHUB_SHA}"

upload:
name: Upload executables
runs-on: ubuntu-latest
needs: release
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- run: echo "hoge" > attachment.txt
- name: Upload executables
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release.outputs.release_tag }} attachment.txt

publish:
name: Publish release
runs-on: ubuntu-latest
needs: [release, rename, upload]
env:
GH_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- run: gh release edit ${{ needs.release.outputs.release_tag }} --draft=false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
5 changes: 5 additions & 0 deletions renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
extends: [
"github>mshrtsr/renovate-config",
]
}

0 comments on commit 35c6f83

Please sign in to comment.