릴리스 3.2 - Github 작업
5228 단어 opensource
Github 액션이란?
Github 작업은 CI/CD 도구입니다. GitHub(Azure)에서 가상 머신(Linux, Windows,macOS)을 빌릴 수 있습니다. 저에게는 클라우드의 git hook과 같습니다. 코드(푸시, PR, 태그)를 변경할 때마다 실행할 몇 가지 명령을 지정할 수 있으며 결과는 저장소에 표시됩니다.
사용 방법.
github 작업에 대한 모든 명령은
.github/workflows/*.yaml
에 있습니다. yaml은 JSON의 상위 집합입니다. 구문은 다음과 같습니다.name: node-js-ci
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [12.x]
우리는 리포지토리의 다른 분기에 대해 다른 작업을 수행할 수 있습니다.
녹 프로젝트로 작업하십시오.
저는
rust
를 처음 사용하므로 먼저 MacBook에 rust
를 설치합니다.curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rust
문서를 읽어보니 cargo
처럼 패키지 도구 npm
를 알게 되었습니다. 이 문제https://github.com/infinyon/future-aio/issues/36의 경우 태그v*
가 포함된 푸시가 있을 때 릴리스를 생성해야 합니다. 그리고 이것은 아래 코드에 의해 수행됩니다.on:
push:
tags:
- 'v*'
name: Create Release
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 }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: ./changelist.md
draft: false
prerelease: false
또한 다음 릴리스 노트를 추적하기 위해
./changelist.md
파일을 만들었습니다. 따라서 릴리스 본문은 이 파일의 내용으로 대체됩니다.Reference
이 문제에 관하여(릴리스 3.2 - Github 작업), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/yzwdroid/release-3-2-github-action-1bcp텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)