diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f337917 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Release + +on: + release: + types: [published] + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Update major version tag + run: | + version=$(echo "${{ github.ref }}" | sed -r "s/^.*(v[0-9]).*$/\1/") + + echo "Major Version: $version" + + git config --local user.email "github-actions" + git config --local user.name "github-actions@github.com" + + git tag -fa $version -m "Update $version tag" + git push -f origin $version diff --git a/README.md b/README.md index 20774fc..c8df1d9 100644 --- a/README.md +++ b/README.md @@ -31,3 +31,13 @@ This action follows [the recommendations of GitHub Actions Versioning](https://g $ yarn $ yarn run package ``` + +## Releasing + +1. Check the package contents are up-to-date + ``` + $ yarn run package + $ git diff + ``` +2. Create new release to publish to the GitHub Marketplace +3. Make sure that [the release workflow](https://github.com/hidakatsuya/setup-diff-pdf/actions/workflows/release.yml) is successful