LoginSignup
3
3

More than 3 years have passed since last update.

github actions を使って release 作成

Posted at

github actions とは

プッシュ、Issue、リリースなどのGitHubプラットフォームのイベントをトリガーとしてワークフローを起動しましょう。コミュニティが開発・保守し、ユーザが熟知・愛用しているサービスについて、対応するアクションを組み合わせて設定できます。

https://github.co.jp/features/actions

熟知・愛用してるコマンド/イベントを拡張できるやつみたいな雰囲気
(熟知・愛用っていいですね。取り入れやすい雰囲気出してる)

とりあえず入れてみる

https://github.com/marketplace/actions/create-a-release
ここからコピペ
定数とか色々あるけど github 内で入れてくれるぽい

github/workflows/release.yml
name: Create Release

on:
  push:
    # Sequence of patterns matched against refs/tags
    tags:
      - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
  build:
    name: Create Release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Create Release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
        with:
          tag_name: ${{ github.ref }}
          release_name: Release ${{ github.ref }}
          body: |
            Changes in this Release
            - First Change
            - Second Change
          draft: false
          prerelease: false

commit push
tag を作成してみる

git tag vtest
git push origin --tag

(git tag 初めて使った)

Screen Shot 2020-10-09 at 11.11.37.png
おお、リリースが作成された!

これ使って、アーカイブ自動化とか色々できそうすね

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3